first commit
This commit is contained in:
0
rugwebsite/management/commands/__init__.py
Normal file
0
rugwebsite/management/commands/__init__.py
Normal file
19
rugwebsite/management/commands/initsaml.py
Normal file
19
rugwebsite/management/commands/initsaml.py
Normal file
@ -0,0 +1,19 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
|
||||
try:
|
||||
import urllib # python 2
|
||||
except:
|
||||
import urllib.request as urllib # python 3
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Initialize saml2 authentication files'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
pass
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
urllib.urlretrieve(settings.SAML_PROVIDER_METADATA_URL, os.path.join())
|
||||
|
Reference in New Issue
Block a user