OAuth2 handling class for FHIR servers. More...
Public Member Functions | |
def | __init__ (self, state=None) |
def | ready (self) |
def | reset (self) |
def | can_sign_headers (self) |
def | signed_headers (self, headers) |
Returns updated HTTP request headers, if possible, raises if there is no access_token. More... | |
def | authorize_uri (self, server) |
The URL to authorize against. More... | |
def | handle_callback (self, url, server) |
Verify OAuth2 callback URL and exchange the code, if everything goes well, for an access token. More... | |
def | reauthorize (self, server) |
Perform reauthorization. More... | |
def | state (self) |
def | from_state (self, state) |
Update ivars from given state information. More... | |
def | extract_oauth_error (self, args) |
Check if an argument dictionary contains OAuth error information. More... | |
Public Member Functions inherited from fhirclient.auth.FHIRAuth | |
def | register (cls) |
Register this class to handle authorization types of the given type. More... | |
def | from_capability_security (cls, security, state=None) |
Supply a capabilitystatement.rest.security statement and this method will figure out which type of security should be instantiated. More... | |
def | create (cls, auth_type, state=None) |
Factory method to create the correct subclass for the given authorization type. More... | |
def | __init__ (self, state=None) |
def | ready (self) |
Indicates whether the authorization part is ready to make resource requests. More... | |
def | reset (self) |
def | can_sign_headers (self) |
def | authorize_uri (self, server) |
Return the authorize URL to use, if any. More... | |
def | handle_callback (self, url, server) |
Return the launch context. More... | |
def | reauthorize (self) |
Perform a re-authorization of some form. More... | |
def | state (self) |
def | from_state (self, state) |
Update ivars from given state information. More... | |
Public Attributes | |
aud | |
auth_state | |
app_secret | |
access_token | |
refresh_token | |
Public Attributes inherited from fhirclient.auth.FHIRAuth | |
app_id | |
Static Public Attributes | |
string | auth_type = 'oauth2' |
Static Public Attributes inherited from fhirclient.auth.FHIRAuth | |
string | auth_type = 'none' |
dictionary | auth_classes = {} |
OAuth2 handling class for FHIR servers.
def fhirclient.auth.FHIROAuth2Auth.__init__ | ( | self, | |
state = None |
|||
) |
def fhirclient.auth.FHIROAuth2Auth.authorize_uri | ( | self, | |
server | |||
) |
The URL to authorize against.
The server
param is supplied so that the server can be informed of state changes that need to be stored.
def fhirclient.auth.FHIROAuth2Auth.can_sign_headers | ( | self | ) |
def fhirclient.auth.FHIROAuth2Auth.extract_oauth_error | ( | self, | |
args | |||
) |
Check if an argument dictionary contains OAuth error information.
def fhirclient.auth.FHIROAuth2Auth.from_state | ( | self, | |
state | |||
) |
Update ivars from given state information.
def fhirclient.auth.FHIROAuth2Auth.handle_callback | ( | self, | |
url, | |||
server | |||
) |
Verify OAuth2 callback URL and exchange the code, if everything goes well, for an access token.
:param str url: The callback/redirect URL to handle :param server: The Server instance to use :returns: The launch context dictionary
def fhirclient.auth.FHIROAuth2Auth.ready | ( | self | ) |
def fhirclient.auth.FHIROAuth2Auth.reauthorize | ( | self, | |
server | |||
) |
Perform reauthorization.
:param server: The Server instance to use :returns: The launch context dictionary, or None on failure
def fhirclient.auth.FHIROAuth2Auth.reset | ( | self | ) |
def fhirclient.auth.FHIROAuth2Auth.signed_headers | ( | self, | |
headers | |||
) |
Returns updated HTTP request headers, if possible, raises if there is no access_token.
def fhirclient.auth.FHIROAuth2Auth.state | ( | self | ) |
fhirclient.auth.FHIROAuth2Auth.access_token |
fhirclient.auth.FHIROAuth2Auth.app_secret |
fhirclient.auth.FHIROAuth2Auth.aud |
fhirclient.auth.FHIROAuth2Auth.auth_state |
|
static |
fhirclient.auth.FHIROAuth2Auth.refresh_token |