parent
f755580a91
commit
566bc6a6e1
|
@ -137,6 +137,12 @@ public class ClientRegistrationsTest {
|
||||||
assertThat(provider.getUserInfoEndpoint().getUri()).isEqualTo("https://example.com/oauth2/v3/userinfo");
|
assertThat(provider.getUserInfoEndpoint().getUri()).isEqualTo("https://example.com/oauth2/v3/userinfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void issuerWhenContainsTrailingSlashThenSuccess() throws Exception {
|
||||||
|
assertThat(registration("")).isNotNull();
|
||||||
|
assertThat(this.issuer.endsWith("/")).isTrue();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
|
* https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
|
||||||
*
|
*
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.junit.Test;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.assertj.core.api.Assertions.assertThatCode;
|
import static org.assertj.core.api.Assertions.assertThatCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,6 +92,14 @@ public class JwtDecodersTests {
|
||||||
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
.hasMessageContaining("This iss claim is not equal to the configured issuer");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void issuerWhenContainsTrailingSlashThenSuccess() {
|
||||||
|
prepareOpenIdConfigurationResponse();
|
||||||
|
this.server.enqueue(new MockResponse().setBody(JWK_SET));
|
||||||
|
assertThat(JwtDecoders.fromOidcIssuerLocation(this.issuer)).isNotNull();
|
||||||
|
assertThat(this.issuer.endsWith("/")).isTrue();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void issuerWhenResponseIsNonCompliantThenThrowsRuntimeException() {
|
public void issuerWhenResponseIsNonCompliantThenThrowsRuntimeException() {
|
||||||
prepareOpenIdConfigurationResponse("{ \"missing_required_keys\" : \"and_values\" }");
|
prepareOpenIdConfigurationResponse("{ \"missing_required_keys\" : \"and_values\" }");
|
||||||
|
|
Loading…
Reference in New Issue