Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# UNRELEASED
- Add Swift name to `resumeExternalUserAgentFlowWithURL:error:` and update hint. (#966)
- Replace case range with explicit case labels in OIDTokenUtilities. Addresses issue #947. ([#963](https://github.com/openid/AppAuth-iOS/pull/963))

# 2.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// such as no pending flow, which previously surfaced as an NSException.
if let authorizationFlow = self.currentAuthorizationFlow {
do {
try authorizationFlow.resumeExternalUserAgentFlow(with: url)
try authorizationFlow.resumeExternalUserAgentFlow?(with: url)
self.currentAuthorizationFlow = nil
return true
} catch {
Expand Down
2 changes: 1 addition & 1 deletion Examples/Example-iOS_Swift-SPM/Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
// such as no pending flow, which previously surfaced as an NSException.
if let authorizationFlow = self.currentAuthorizationFlow {
do {
try authorizationFlow.resumeExternalUserAgentFlow(with: url)
try authorizationFlow.resumeExternalUserAgentFlow?(url)
Comment thread
w-goog marked this conversation as resolved.
self.currentAuthorizationFlow = nil
return true
} catch {
Expand Down
6 changes: 4 additions & 2 deletions Sources/AppAuthCore/OIDExternalUserAgentSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ NS_ASSUME_NONNULL_BEGIN
@remarks Has no effect if called more than once, or after a @c cancel message was received.
@return YES if the passed URL matches the expected redirect URL and was consumed, NO otherwise.
*/
- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL __deprecated_msg("Use resumeExternalUserAgentFlowWithURL:error: instead");
- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL
__deprecated_msg("Use resumeExternalUserAgentFlowWithURL:error: instead. "
"Swift: Use the throwing resumeExternalUserAgentFlow(_:)");

@optional
/*! @brief Clients should call this method with the result of the external user-agent code flow if
Expand All @@ -71,7 +73,7 @@ NS_ASSUME_NONNULL_BEGIN
NO if the URL did not match (\@c OIDErrorCodeURLMismatch) or no authorization flow
was pending (\@c OIDErrorCodeInvalidAuthorizationFlow).
*/
- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL error:(NSError *_Nullable *_Nullable)error;
- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL error:(NSError *_Nullable *_Nullable)error NS_SWIFT_NAME(resumeExternalUserAgentFlow(_:));

@required
/*! @brief @c OIDExternalUserAgent or clients should call this method when the
Expand Down