File tree 1 file changed +2
-1
lines changed
src/main/kotlin/no/nav/security/mock/oauth2/extensions
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,14 @@ import com.nimbusds.oauth2.sdk.OAuth2Error
4
4
import no.nav.security.mock.oauth2.OAuth2Exception
5
5
import okhttp3.HttpUrl
6
6
7
- fun HttpUrl.isWellKnownUrl (): Boolean = this == this .toWellKnownUrl()
7
+ fun HttpUrl.isWellKnownUrl (): Boolean = this == this .toWellKnownUrl() || this == this .toOAuth2AuthorizationServerMetadataUrl()
8
8
fun HttpUrl.isAuthorizationEndpointUrl (): Boolean = this .withoutQuery() == this .toAuthorizationEndpointUrl()
9
9
fun HttpUrl.isTokenEndpointUrl (): Boolean = this == this .toTokenEndpointUrl()
10
10
fun HttpUrl.isJwksUrl (): Boolean = this == this .toJwksUrl()
11
11
fun HttpUrl.isDebuggerUrl (): Boolean = this .withoutQuery() == this .toDebuggerUrl()
12
12
fun HttpUrl.isDebuggerCallbackUrl (): Boolean = this .withoutQuery() == this .toDebuggerCallbackUrl()
13
13
14
+ fun HttpUrl.toOAuth2AuthorizationServerMetadataUrl () = this .resolvePath(" /${issuerId()} /.well-known/oauth-authorization-server" )
14
15
fun HttpUrl.toWellKnownUrl (): HttpUrl = this .resolvePath(" /${issuerId()} /.well-known/openid-configuration" )
15
16
fun HttpUrl.toAuthorizationEndpointUrl (): HttpUrl = this .resolvePath(" /${issuerId()} /authorize" )
16
17
fun HttpUrl.toTokenEndpointUrl (): HttpUrl = this .resolvePath(" /${issuerId()} /token" )
You can’t perform that action at this time.
0 commit comments