AppAuth
Class Methods | Properties | List of all members
OIDAuthorizationService Class Reference

Performs various OAuth and OpenID Connect related calls via the user agent or NSURLSession. More...

#import <OIDAuthorizationService.h>

Inheritance diagram for OIDAuthorizationService:

Class Methods

(void) + discoverServiceConfigurationForIssuer:completion:
 Convenience method for creating an authorization service configuration from an OpenID Connect compliant issuer URL. More...
 
(void) + discoverServiceConfigurationForDiscoveryURL:completion:
 Convenience method for creating an authorization service configuration from an OpenID Connect compliant identity provider's discovery document. More...
 
(id< OIDExternalUserAgentSession >) + presentAuthorizationRequest:externalUserAgent:callback:
 Perform an authorization flow using a generic flow shim. More...
 
(id< OIDExternalUserAgentSession >) + presentEndSessionRequest:externalUserAgent:callback:
 Perform a logout request. More...
 
(void) + performTokenRequest:callback:
 Performs a token request. More...
 
(void) + performTokenRequest:originalAuthorizationResponse:callback:
 Performs a token request. More...
 
(void) + performRegistrationRequest:completion:
 Performs a registration request. More...
 
(id< OIDExternalUserAgentSession >) + presentAuthorizationRequest:presentingViewController:callback:
 Perform an authorization flow using SFSafariViewController. More...
 
(id< OIDExternalUserAgentSession >) + presentAuthorizationRequest:callback:
 Perform an authorization flow using the default browser. More...
 

Properties

OIDServiceConfigurationconfiguration
 The service's configuration. More...
 

Detailed Description

Performs various OAuth and OpenID Connect related calls via the user agent or NSURLSession.

Method Documentation

◆ discoverServiceConfigurationForDiscoveryURL:completion:()

+ (void) discoverServiceConfigurationForDiscoveryURL: (NSURL *)  discoveryURL
completion: (OIDDiscoveryCallback completion 

Convenience method for creating an authorization service configuration from an OpenID Connect compliant identity provider's discovery document.

Parameters
discoveryURLThe URL of the service provider's OpenID Connect discovery document.
completionA block which will be invoked when the authorization service configuration has been created, or when an error has occurred.
See also
https://openid.net/specs/openid-connect-discovery-1_0.html

◆ discoverServiceConfigurationForIssuer:completion:()

+ (void) discoverServiceConfigurationForIssuer: (NSURL *)  issuerURL
completion: (OIDDiscoveryCallback completion 

Convenience method for creating an authorization service configuration from an OpenID Connect compliant issuer URL.

Parameters
issuerURLThe service provider's OpenID Connect issuer.
completionA block which will be invoked when the authorization service configuration has been created, or when an error has occurred.
See also
https://openid.net/specs/openid-connect-discovery-1_0.html

◆ performRegistrationRequest:completion:()

+ (void) performRegistrationRequest: (OIDRegistrationRequest *)  request
completion: (OIDRegistrationCompletion completion 

Performs a registration request.

Parameters
requestThe registration request.
completionThe method called when the request has completed or failed.

◆ performTokenRequest:callback:()

+ (void) performTokenRequest: (OIDTokenRequest *)  request
callback: (OIDTokenCallback callback 

Performs a token request.

Parameters
requestThe token request.
callbackThe method called when the request has completed or failed.

◆ performTokenRequest:originalAuthorizationResponse:callback:()

+ (void) performTokenRequest: (OIDTokenRequest *)  request
originalAuthorizationResponse: (OIDAuthorizationResponse *_Nullable)  authorizationResponse
callback: (OIDTokenCallback callback 

Performs a token request.

Parameters
requestThe token request.
authorizationResponseThe original authorization response related to this token request.
callbackThe method called when the request has completed or failed.

◆ presentAuthorizationRequest:callback:()

+ (id<OIDExternalUserAgentSession>) presentAuthorizationRequest: (OIDAuthorizationRequest *)  request
callback: (OIDAuthorizationCallback callback 

Perform an authorization flow using the default browser.

Parameters
requestThe authorization request.
callbackThe method called when the request has completed or failed.
Returns
A OIDExternalUserAgentSession instance which will terminate when it receives a cancel (OIDExternalUserAgentSession-p) message, or after processing a resumeExternalUserAgentFlowWithURL: (OIDExternalUserAgentSession-p) message.

Provided by category OIDAuthorizationService(Mac).

◆ presentAuthorizationRequest:externalUserAgent:callback:()

+ (id<OIDExternalUserAgentSession>) presentAuthorizationRequest: (OIDAuthorizationRequest *)  request
externalUserAgent: (id< OIDExternalUserAgent >)  externalUserAgent
callback: (OIDAuthorizationCallback callback 

Perform an authorization flow using a generic flow shim.

Parameters
requestThe authorization request.
externalUserAgentGeneric external user-agent that can present an authorization request.
callbackThe method called when the request has completed or failed.
Returns
A OIDExternalUserAgentSession instance which will terminate when it receives a cancel (OIDExternalUserAgentSession-p) message, or after processing a resumeExternalUserAgentFlowWithURL: (OIDExternalUserAgentSession-p) message.

◆ presentAuthorizationRequest:presentingViewController:callback:()

+ (id<OIDExternalUserAgentSession>) presentAuthorizationRequest: (OIDAuthorizationRequest *)  request
presentingViewController: (UIViewController *)  presentingViewController
callback: (OIDAuthorizationCallback callback 

Perform an authorization flow using SFSafariViewController.

Parameters
requestThe authorization request.
presentingViewControllerThe view controller from which to present the SFSafariViewController.
callbackThe method called when the request has completed or failed.
Returns
A OIDExternalUserAgentSession instance which will terminate when it receives a cancel (OIDExternalUserAgentSession-p) message, or after processing a resumeExternalUserAgentFlowWithURL: (OIDExternalUserAgentSession-p) message.

Provided by category OIDAuthorizationService(IOS).

◆ presentEndSessionRequest:externalUserAgent:callback:()

+ (id<OIDExternalUserAgentSession>) presentEndSessionRequest: (OIDEndSessionRequest *)  request
externalUserAgent: (id< OIDExternalUserAgent >)  externalUserAgent
callback: (OIDEndSessionCallback callback 

Perform a logout request.

Parameters
requestThe end-session logout request.
externalUserAgentGeneric external user-agent that can present user-agent requests.
callbackThe method called when the request has completed or failed.
Returns
A OIDExternalUserAgentSession instance which will terminate when it receives a cancel (OIDExternalUserAgentSession-p) message, or after processing a resumeExternalUserAgentFlowWithURL: (OIDExternalUserAgentSession-p) message.
See also
http://openid.net/specs/openid-connect-session-1_0.html#RPLogout

Property Documentation

◆ configuration

- (OIDServiceConfiguration*) configuration
readnonatomicassign

The service's configuration.

Remarks
Each authorization service is initialized with a configuration. This configuration specifies how to connect to a particular OAuth provider. Clients should use separate authorization service instances for each provider they wish to integrate with. Configurations may be created manually, or via an OpenID Connect Discovery Document.

The documentation for this class was generated from the following file: