Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OIDRedirectHTTPHandler.h #820

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Source/AppAuth/macOS/OIDRedirectHTTPHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Source/AppAuth/macOS/OIDRedirectHTTPHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down Expand Up @@ -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 {
Expand Down