diff --git a/Source/AppAuth/macOS/OIDRedirectHTTPHandler.h b/Source/AppAuth/macOS/OIDRedirectHTTPHandler.h index 831eb0bb3..db750ca0c 100644 --- a/Source/AppAuth/macOS/OIDRedirectHTTPHandler.h +++ b/Source/AppAuth/macOS/OIDRedirectHTTPHandler.h @@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN Calling this more than once will result in the previous listener being cancelled (equivalent of @c cancelHTTPListener being called). */ -- (NSURL *)startHTTPListener:(NSError **)returnError withPort:(uint16_t)port; +- (nullable NSURL *)startHTTPListenerWithPort:(uint16_t)port error:(NSError **)returnError NS_SWIFT_NAME(startHTTPListener(port:)); /*! @brief Starts listening on the loopback interface on a random available port, and returns a URL with the base address. Use the returned redirect URI to build a @c OIDExternalUserAgentRequest, @@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN Calling this more than once will result in the previous listener being cancelled (equivalent of @c cancelHTTPListener being called). */ -- (NSURL *)startHTTPListener:(NSError **)returnError; +- (nullable NSURL *)startHTTPListener:(NSError **)returnError; /*! @brief Stops listening the loopback interface and sends an cancellation error (in the domain ::OIDGeneralErrorDomain, with the code ::OIDErrorCodeProgramCanceledAuthorizationFlow) to diff --git a/Source/AppAuth/macOS/OIDRedirectHTTPHandler.m b/Source/AppAuth/macOS/OIDRedirectHTTPHandler.m index 3d0d765d8..e25f236b4 100644 --- a/Source/AppAuth/macOS/OIDRedirectHTTPHandler.m +++ b/Source/AppAuth/macOS/OIDRedirectHTTPHandler.m @@ -68,7 +68,7 @@ - (instancetype)initWithSuccessURL:(nullable NSURL *)successURL { return self; } -- (NSURL *)startHTTPListener:(NSError **)returnError withPort:(uint16_t)port { +- (NSURL *)startHTTPListenerWithPort:(uint16_t)port error:(NSError **)returnError { // Cancels any pending requests. [self cancelHTTPListener]; @@ -98,7 +98,7 @@ - (NSURL *)startHTTPListener:(NSError **)returnError withPort:(uint16_t)port { - (NSURL *)startHTTPListener:(NSError **)returnError { // A port of 0 requests a random available port - return [self startHTTPListener:returnError withPort:0]; + return [self startHTTPListenerWithPort:0 error:returnError]; } - (void)cancelHTTPListener {