-
Notifications
You must be signed in to change notification settings - Fork 7
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
Authenticator
- Various revisions
#688
Conversation
I'm not seeing any apparent use for it
@@ -48,9 +38,9 @@ struct AuthenticationApp: App { | |||
// - Integrated Windows Authentication (IWA) | |||
// - Client Certificate (PKI) | |||
.authenticator(authenticator) | |||
.environmentObject(authenticator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While considering this feedback I noticed that this environment object appears to go unused in the example.
Without a good use for the suggested environment value it seems like it might be better to just remove it altogether.
@@ -18,19 +18,9 @@ import ArcGIS | |||
|
|||
@main | |||
struct AuthenticationApp: App { | |||
@ObservedObject var authenticator: Authenticator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AuthenticationApp
owns the Authenticator instance so this should be a StateObject
as noted here.
) | ||
// Sets authenticator as ArcGIS and Network challenge handlers to handle authentication | ||
// challenges. | ||
ArcGISEnvironment.authenticationManager.handleChallenges(using: authenticator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With authenticator
as a StateObject
, this causes a purple runtime warning. As a result, I've moved this call to handleChallenges
into the task below.
Group { | ||
HomeView() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes the unneeded Group
in response to this feedback
Adjust commenting to silence comment_spacing switlint violation
@@ -73,7 +66,7 @@ struct AuthenticationApp: App { | |||
// // The scheme of the redirect URL is also specified in the Info.plist file. | |||
// redirectURL: URL(string: "authexample://auth")! | |||
// ) | |||
//} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncommenting the extension but leaving the property within commented prevents us from violating the swiftlint comment_spacing rule.
Resolves various issues found during review of #392