|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.security.oauth2.provider.AuthorizationRequest
public class AuthorizationRequest
A request for authorization by an OAuth 2 Client, normally received and
processed by the AuthorizationEndpoint. This class is meant to be manipulated
throughout the authorization process, and is therefore treated as ephemeral
and not to be stored long term. For long term storage, use the read-only
OAuth2Request class.
HTTP request parameters are stored in the parameters map, and any processing
the server makes throughout the lifecycle of a request are stored on
individual properties. The original request parameters will remain available
through the parameters map. For convenience, constants are defined in order
to get at those original values. However, the parameters map is unmodifiable
so that processing cannot drop the original values.
This class is Serializable in order to support storage of the
authorization request as a SessionAttributes member while the end
user through the authorization process (which may span several page
requests).
| Constructor Summary | |
|---|---|
AuthorizationRequest()
Default constructor. |
|
AuthorizationRequest(Map<String,String> authorizationParameters,
Map<String,String> approvalParameters,
String clientId,
Set<String> scope,
Set<String> resourceIds,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities,
boolean approved,
String state,
String redirectUri,
Set<String> responseTypes)
Full constructor. |
|
AuthorizationRequest(String clientId,
Collection<String> scopes)
Convenience constructor for unit tests, where client ID and scope are often the only needed fields. |
|
| Method Summary | |
|---|---|
OAuth2Request |
createOAuth2Request()
|
boolean |
equals(Object obj)
|
Map<String,String> |
getApprovalParameters()
|
Collection<? extends org.springframework.security.core.GrantedAuthority> |
getAuthorities()
|
String |
getClientId()
|
Map<String,Serializable> |
getExtensions()
|
String |
getRedirectUri()
|
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()
|
String |
getState()
|
int |
hashCode()
|
boolean |
isApproved()
|
void |
setApprovalParameters(Map<String,String> approvalParameters)
|
void |
setApproved(boolean approved)
|
void |
setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
|
void |
setClientId(String clientId)
|
void |
setExtensions(Map<String,Serializable> extensions)
|
void |
setRedirectUri(String redirectUri)
|
void |
setRequestParameters(Map<String,String> requestParameters)
Set the Request Parameters on this authorization request, which represent the original request parameters and should never be changed during processing. |
void |
setResourceIds(Set<String> resourceIds)
|
void |
setResourceIdsAndAuthoritiesFromClientDetails(ClientDetails clientDetails)
Convenience method to set resourceIds and authorities on this request by inheriting from a ClientDetails object. |
void |
setResponseTypes(Set<String> responseTypes)
|
void |
setScope(Collection<String> scope)
Set the scope value. |
void |
setState(String state)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthorizationRequest()
public AuthorizationRequest(Map<String,String> authorizationParameters,
Map<String,String> approvalParameters,
String clientId,
Set<String> scope,
Set<String> resourceIds,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities,
boolean approved,
String state,
String redirectUri,
Set<String> responseTypes)
public AuthorizationRequest(String clientId,
Collection<String> scopes)
clientId - scopes - | Method Detail |
|---|
public OAuth2Request createOAuth2Request()
public void setResourceIdsAndAuthoritiesFromClientDetails(ClientDetails clientDetails)
clientDetails - public Map<String,String> getApprovalParameters()
public void setApprovalParameters(Map<String,String> approvalParameters)
public String getState()
public void setState(String state)
public Set<String> getResponseTypes()
public void setResponseTypes(Set<String> responseTypes)
public void setRedirectUri(String redirectUri)
public void setApproved(boolean approved)
public void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
public Map<String,Serializable> getExtensions()
public void setExtensions(Map<String,Serializable> extensions)
public void setResourceIds(Set<String> resourceIds)
public void setClientId(String clientId)
public void setScope(Collection<String> scope)
OAuth2Utils.parseParameterList.
scope - TokenRequest.setScopepublic void setRequestParameters(Map<String,String> requestParameters)
requestParameters - TokenRequest.setRequestParameterspublic Set<String> getResourceIds()
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
public boolean isApproved()
public String getRedirectUri()
public int hashCode()
public boolean equals(Object obj)
public String getClientId()
public Set<String> getScope()
public Map<String,String> getRequestParameters()
getScope() or { getClientId(), rather than
retrieving values from this map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||