Retrieving the UserInfo is conditional

Fixes gh-4451
This commit is contained in:
Joe Grandja
2017-09-29 10:51:02 -04:00
parent f3828924ff
commit ad91adf9dc
5 changed files with 112 additions and 10 deletions

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.oauth2.oidc.core;
import org.springframework.security.oauth2.core.AccessToken;
/**
* The <i>scope</i> values defined by the <i>OpenID Connect Core 1.0</i> specification
* that can be used to request {@link StandardClaim Claims}.
* <p>
* The scope(s) associated to an {@link AccessToken} determine what claims (resources)
* will be available when they are used to access <i>OAuth 2.0 Protected Endpoints</i>,
* such as the <i>UserInfo Endpoint</i>.
*
* @author Joe Grandja
* @since 5.0
* @see StandardClaim
* @see <a target="_blank" href="http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims">Requesting Claims using Scope Values</a>
*/
public interface OidcScope {
String OPENID = "openid";
String PROFILE = "profile";
String EMAIL = "email";
String ADDRESS = "address";
String PHONE = "phone";
}