IAuthServiceProvider

protocol IAuthServiceProvider

Protocol specifies methods which have to be implemented by class that manages authorization requests to the AppAuth framework.

  • Performs obtaining service configuration for specified domain.

    Declaration

    Swift

    func discoverServiceConfig(for url: URL) -> (OIDServiceConfiguration?, NSError?)

    Parameters

    url

    Domain for which the configuration should be obtained.

    Return Value

    Service configuration and nil as error on success or nil as configuration and error on failure.

  • Presents authorization request.

    Declaration

    Swift

    func presentAuthRequest(_ request: OIDAuthorizationRequest, viewController: UIViewController) -> (OIDExternalUserAgentSession?, OIDAuthorizationResponse?, NSError?)

    Parameters

    request

    Request to be presented.

    viewController

    The UIViewController to present auth request.

    Return Value

    User session, auth response and nil as error on success or nil as session and response and error on failure.

  • Presents hybrid flow request.

    Declaration

    Swift

    func presentHybridFlowRequest(_ requestUrl: URL, scheme: String?, userAgent: OIDExternalUserAgentIOS) -> (URL?, NSError?)

    Parameters

    requestUrl

    Url which is used in hybrid flow request.

    scheme

    Scheme which is used for hybrid flow request.

    userAgent

    Agent that takes part in hybrd flow request presentation.

    Return Value

    URL and nil as error on success or nil as URL and error on failure.

  • Presents token request.

    Declaration

    Swift

    func performTokenRequest(_ request: OIDTokenRequest) -> (OIDTokenResponse?, NSError?)

    Parameters

    request

    Request to be presented.

    Return Value

    Response and nil as error on success or nil as response and error on failure.

  • Presents end session request.

    Declaration

    Swift

    func presentEndSessionRequest(_ request: OIDEndSessionRequest, externalUserAgent: OIDExternalUserAgent) -> (OIDEndSessionResponse?, OIDExternalUserAgentSession?, NSError?)

    Parameters

    request

    Request to be presented.

    externalUserAgent

    Agent that takes part in end session request.

    Return Value

    Response, session and nil as error on success or nil as response and session and error on failure.