mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 21:42:17 +00:00
Remove address and phone scope from CommonOAuth2Provider.OKTA
Fixes gh-5987
This commit is contained in:
parent
a472153a31
commit
921abefaa2
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -86,7 +86,7 @@ public enum CommonOAuth2Provider {
|
|||||||
public Builder getBuilder(String registrationId) {
|
public Builder getBuilder(String registrationId) {
|
||||||
ClientRegistration.Builder builder = getBuilder(registrationId,
|
ClientRegistration.Builder builder = getBuilder(registrationId,
|
||||||
ClientAuthenticationMethod.BASIC, DEFAULT_REDIRECT_URL);
|
ClientAuthenticationMethod.BASIC, DEFAULT_REDIRECT_URL);
|
||||||
builder.scope("openid", "profile", "email", "address", "phone");
|
builder.scope("openid", "profile", "email");
|
||||||
builder.userNameAttributeName(IdTokenClaimNames.SUB);
|
builder.userNameAttributeName(IdTokenClaimNames.SUB);
|
||||||
builder.clientName("Okta");
|
builder.clientName("Okta");
|
||||||
return builder;
|
return builder;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -123,8 +123,7 @@ public class CommonOAuth2ProviderTests {
|
|||||||
assertThat(registration.getAuthorizationGrantType())
|
assertThat(registration.getAuthorizationGrantType())
|
||||||
.isEqualTo(AuthorizationGrantType.AUTHORIZATION_CODE);
|
.isEqualTo(AuthorizationGrantType.AUTHORIZATION_CODE);
|
||||||
assertThat(registration.getRedirectUriTemplate()).isEqualTo(DEFAULT_REDIRECT_URL);
|
assertThat(registration.getRedirectUriTemplate()).isEqualTo(DEFAULT_REDIRECT_URL);
|
||||||
assertThat(registration.getScopes()).containsOnly("openid", "profile", "email",
|
assertThat(registration.getScopes()).containsOnly("openid", "profile", "email");
|
||||||
"address", "phone");
|
|
||||||
assertThat(registration.getClientName()).isEqualTo("Okta");
|
assertThat(registration.getClientName()).isEqualTo("Okta");
|
||||||
assertThat(registration.getRegistrationId()).isEqualTo("123");
|
assertThat(registration.getRegistrationId()).isEqualTo("123");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user