org.springframework.security.oauth2.provider
Class OAuth2Request
java.lang.Object
org.springframework.security.oauth2.provider.OAuth2Request
- All Implemented Interfaces:
- Serializable
public class OAuth2Request
- extends Object
- implements Serializable
Represents a stored authorization or token request. Used as part of the OAuth2Authentication object to store a
request's authentication information. Does not expose public setters so that clients can not mutate state if they
respect the declared type of the request.
- Author:
- Amanda Anganes, Dave Syer
- See Also:
- Serialized Form
|
Constructor Summary |
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)
|
OAuth2Request
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)
OAuth2Request
protected OAuth2Request(OAuth2Request other)
OAuth2Request
protected OAuth2Request(String clientId)
OAuth2Request
protected OAuth2Request()
getRedirectUri
public String getRedirectUri()
getResponseTypes
public Set<String> getResponseTypes()
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
isApproved
public boolean isApproved()
getResourceIds
public Set<String> getResourceIds()
getExtensions
public Map<String,Serializable> getExtensions()
createOAuth2Request
public OAuth2Request createOAuth2Request(Map<String,String> parameters)
- Update the request parameters and return a new object with the same properties except the parameters.
- Parameters:
parameters - new parameters replacing the existing ones
- Returns:
- a new OAuth2Request
hashCode
public int hashCode()
equals
public boolean equals(Object obj)
getClientId
public String getClientId()
getScope
public Set<String> getScope()
getRequestParameters
public 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.
- Returns:
- the original, unchanged set of request parameters
setScope
protected void setScope(Collection<String> scope)
setRequestParameters
protected void setRequestParameters(Map<String,String> requestParameters)
setClientId
protected void setClientId(String clientId)
Copyright © 2013. All rights reserved.