Skip to content

Commit

Permalink
Using discovery url (#146)
Browse files Browse the repository at this point in the history
Using the provided discovery url

Co-authored-by: Sameh Sayed <[email protected]>
  • Loading branch information
sameh0 and sameh0 authored Aug 1, 2023
1 parent 292d92b commit e88011c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/AuthFoundation/OAuth2/OAuth2Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public final class OAuth2Client {

openIdConfigurationAction = action

let request = OpenIdConfigurationRequest(baseURL: baseURL)
let request = OpenIdConfigurationRequest(url: configuration.discoveryURL)
request.send(to: self) { result in
self.configurationQueue.sync(flags: .barrier) {
self.openIdConfigurationAction = nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import FoundationNetworking

struct OpenIdConfigurationRequest {
let url: URL

init(baseURL: URL) {
url = baseURL.appendingPathComponent(".well-known/openid-configuration")
}
}

extension OpenIdConfigurationRequest: APIRequest {
Expand Down

0 comments on commit e88011c

Please sign in to comment.