public class OAuth2Request extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
protected |
OAuth2Request() |
|
OAuth2Request(Map<String,String> requestParameters,
String clientId,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities,
boolean approved,
Set<String> scope,
Set<String> resourceIds,
String redirectUri,
Set<String> responseTypes,
Map<String,Serializable> extensionProperties) |
protected |
OAuth2Request(OAuth2Request other) |
protected |
OAuth2Request(String clientId) |
Modifier and Type | Method and Description |
---|---|
OAuth2Request |
createOAuth2Request(Map<String,String> parameters)
Update the request parameters and return a new object with the same properties except the parameters.
|
boolean |
equals(Object obj) |
Collection<? extends org.springframework.security.core.GrantedAuthority> |
getAuthorities() |
String |
getClientId() |
Map<String,Serializable> |
getExtensions() |
String |
getGrantType()
Tries to discover the grant type requested for the token associated with this request.
|
String |
getRedirectUri() |
TokenRequest |
getRefreshTokenRequest()
If this request was for an access token to be refreshed, then the
TokenRequest that led to the refresh
may be available here if it is known. |
Map<String,String> |
getRequestParameters()
Warning: most clients should use the individual properties of this class,
such as {
getScope() or { getClientId() , rather than
retrieving values from this map. |
Set<String> |
getResourceIds() |
Set<String> |
getResponseTypes() |
Set<String> |
getScope() |
int |
hashCode() |
boolean |
isApproved() |
boolean |
isRefresh() |
OAuth2Request |
narrowScope(Set<String> scope)
Update the scope and create a new request.
|
OAuth2Request |
refresh(TokenRequest tokenRequest) |
protected void |
setClientId(String clientId) |
protected void |
setRequestParameters(Map<String,String> requestParameters) |
protected void |
setScope(Collection<String> scope) |
public OAuth2Request(Map<String,String> requestParameters, String clientId, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, boolean approved, Set<String> scope, Set<String> resourceIds, String redirectUri, Set<String> responseTypes, Map<String,Serializable> extensionProperties)
protected OAuth2Request(OAuth2Request other)
protected OAuth2Request(String clientId)
protected OAuth2Request()
public String getRedirectUri()
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
public boolean isApproved()
public Map<String,Serializable> getExtensions()
public OAuth2Request createOAuth2Request(Map<String,String> parameters)
parameters
- new parameters replacing the existing onespublic OAuth2Request narrowScope(Set<String> scope)
scope
- the new scopepublic OAuth2Request refresh(TokenRequest tokenRequest)
public boolean isRefresh()
public TokenRequest getRefreshTokenRequest()
TokenRequest
that led to the refresh
may be available here if it is known.public String getGrantType()
public int hashCode()
public boolean equals(Object obj)
public String getClientId()
public Map<String,String> getRequestParameters()
getScope()
or { getClientId()
, rather than
retrieving values from this map.protected void setScope(Collection<String> scope)
protected void setClientId(String clientId)
Copyright © 2019. All rights reserved.