File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/main/kotlin/no/nav/security/mock/oauth2/extensions Expand file tree Collapse file tree 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
44import no.nav.security.mock.oauth2.OAuth2Exception
55import okhttp3.HttpUrl
66
7- fun HttpUrl.isWellKnownUrl (): Boolean = this == this .toWellKnownUrl()
7+ fun HttpUrl.isWellKnownUrl (): Boolean = this == this .toWellKnownUrl() || this == this .toOAuth2AuthorizationServerMetadataUrl()
88fun HttpUrl.isAuthorizationEndpointUrl (): Boolean = this .withoutQuery() == this .toAuthorizationEndpointUrl()
99fun HttpUrl.isTokenEndpointUrl (): Boolean = this == this .toTokenEndpointUrl()
1010fun HttpUrl.isJwksUrl (): Boolean = this == this .toJwksUrl()
1111fun HttpUrl.isDebuggerUrl (): Boolean = this .withoutQuery() == this .toDebuggerUrl()
1212fun HttpUrl.isDebuggerCallbackUrl (): Boolean = this .withoutQuery() == this .toDebuggerCallbackUrl()
1313
14+ fun HttpUrl.toOAuth2AuthorizationServerMetadataUrl () = this .resolvePath(" /${issuerId()} /.well-known/oauth-authorization-server" )
1415fun HttpUrl.toWellKnownUrl (): HttpUrl = this .resolvePath(" /${issuerId()} /.well-known/openid-configuration" )
1516fun HttpUrl.toAuthorizationEndpointUrl (): HttpUrl = this .resolvePath(" /${issuerId()} /authorize" )
1617fun HttpUrl.toTokenEndpointUrl (): HttpUrl = this .resolvePath(" /${issuerId()} /token" )
You can’t perform that action at this time.
0 commit comments