AppAuth
Instance Methods | List of all members
<OIDExternalUserAgentSession> Protocol Reference

Represents an in-flight external user-agent session. More...

#import <OIDExternalUserAgentSession.h>

Inheritance diagram for <OIDExternalUserAgentSession>:

Instance Methods

(void) - cancel
 Cancels the code flow session, invoking the request's callback with a cancelled error. More...
 
(void) - cancelWithCompletion:
 Cancels the code flow session, invoking the request's callback with a cancelled error. More...
 
(BOOL) - resumeExternalUserAgentFlowWithURL:
 Clients should call this method with the result of the external user-agent code flow if it becomes available. More...
 
(void) - failExternalUserAgentFlowWithError:
 OIDExternalUserAgent or clients should call this method when the external user-agent flow failed with a non-OAuth error. More...
 

Detailed Description

Represents an in-flight external user-agent session.

Method Documentation

◆ cancel()

- (void) cancel

Cancels the code flow session, invoking the request's callback with a cancelled error.

Remarks
Has no effect if called more than once, or after a resumeExternalUserAgentFlowWithURL: message was received. Will cause an error with code: OIDErrorCodeProgramCanceledAuthorizationFlow to be passed to the callback block passed to presentAuthorizationRequest:presentingViewController:callback: (OIDAuthorizationService(IOS))

◆ cancelWithCompletion:()

- (void) cancelWithCompletion: (nullable void(^)(void))  completion

Cancels the code flow session, invoking the request's callback with a cancelled error.

Remarks
Has no effect if called more than once, or after a resumeExternalUserAgentFlowWithURL: message was received. Will cause an error with code: OIDErrorCodeProgramCanceledAuthorizationFlow to be passed to the callback block passed to presentAuthorizationRequest:presentingViewController:callback: (OIDAuthorizationService(IOS))
Parameters
completionThe block to be called when the cancel operation ends

◆ failExternalUserAgentFlowWithError:()

- (void) failExternalUserAgentFlowWithError: (NSError *)  error

OIDExternalUserAgent or clients should call this method when the external user-agent flow failed with a non-OAuth error.

Parameters
errorThe error that is the reason for the failure of this external flow.
Remarks
Has no effect if called more than once, or after a cancel message was received.

◆ resumeExternalUserAgentFlowWithURL:()

- (BOOL) resumeExternalUserAgentFlowWithURL: (NSURL *)  URL

Clients should call this method with the result of the external user-agent code flow if it becomes available.

Parameters
URLThe redirect URL invoked by the server. @discussion When the URL represented a valid response, implementations should clean up any left-over UI state from the request, for example by closing the SFSafariViewController or loopback HTTP listener if those were used. The completion block of the pending request should then be invoked.
Remarks
Has no effect if called more than once, or after a cancel message was received.
Returns
YES if the passed URL matches the expected redirect URL and was consumed, NO otherwise.

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