Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10f72ab

Browse files
committed
Refactor Enterprise class to use AuthenticationBase
1 parent 608b8ae commit 10f72ab

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

auth0/v2/authentication/enterprise.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
import requests
1+
from .base import AuthenticationBase
22

33

4-
class Enterprise(object):
4+
class Enterprise(AuthenticationBase):
55

66
def __init__(self, domain):
77
self.domain = domain
88

9-
def saml_login(self, client_id, connection):
10-
"""
11-
"""
9+
def saml_metadata(self, client_id):
10+
return self.get(url='https://%s/samlp/metadata/%s' % (self.domain,
11+
client_id))
1212

13-
return requests.get(
14-
'https://%s/samlp/%s' % (self.domain, client_id),
15-
params={'connection': connection}
16-
)
13+
def wsfed_metadata(self):
14+
url = 'https://%s/wsfed/FederationMetadata' \
15+
'/2007-06/FederationMetadata.xml'
1716

18-
def saml_metadata(self,
17+
return self.get(url=url % self.domain)

0 commit comments

Comments
 (0)