org.springframework.security.oauth2.provider
Class DefaultAuthorizationRequest

java.lang.Object
  extended by org.springframework.security.oauth2.provider.DefaultAuthorizationRequest
All Implemented Interfaces:
Serializable, AuthorizationRequest

public class DefaultAuthorizationRequest
extends Object
implements AuthorizationRequest, Serializable

Base class representing a request for authorization. There are convenience methods for the well-known properties required by the OAuth2 spec, and a set of generic authorizationParameters to allow for extensions.

Author:
Ryan Heaton, Dave Syer, Amanda Anganes
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.security.oauth2.provider.AuthorizationRequest
CLIENT_ID, REDIRECT_URI, RESPONSE_TYPE, SCOPE, STATE, USER_OAUTH_APPROVAL
 
Constructor Summary
DefaultAuthorizationRequest(AuthorizationRequest copy)
           
DefaultAuthorizationRequest(Map<String,String> authorizationParameters)
           
DefaultAuthorizationRequest(Map<String,String> authorizationParameters, Map<String,String> approvalParameters, String clientId, Collection<String> scope)
           
DefaultAuthorizationRequest(String clientId, Collection<String> scope)
           
 
Method Summary
 void addClientDetails(ClientDetails clientDetails)
           
 boolean equals(Object obj)
           
 Map<String,String> getApprovalParameters()
           
 Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
           
 Map<String,String> getAuthorizationParameters()
           
 String getClientId()
           
 String getRedirectUri()
           
 Set<String> getResourceIds()
           
 Set<String> getResponseTypes()
           
 Set<String> getScope()
           
 String getState()
           
 int hashCode()
           
 boolean isApproved()
           
 boolean isDenied()
           
 void setApprovalParameters(Map<String,String> approvalParameters)
           
 void setApproved(boolean approved)
           
 void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
           
 void setAuthorizationParameters(Map<String,String> authorizationParameters)
           
 void setRedirectUri(String redirectUri)
           
 void setResourceIds(Set<String> resourceIds)
           
 void setScope(Set<String> scope)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuthorizationRequest

public DefaultAuthorizationRequest(Map<String,String> authorizationParameters)

DefaultAuthorizationRequest

public DefaultAuthorizationRequest(Map<String,String> authorizationParameters,
                                   Map<String,String> approvalParameters,
                                   String clientId,
                                   Collection<String> scope)

DefaultAuthorizationRequest

public DefaultAuthorizationRequest(String clientId,
                                   Collection<String> scope)

DefaultAuthorizationRequest

public DefaultAuthorizationRequest(AuthorizationRequest copy)
Method Detail

getAuthorizationParameters

public Map<String,String> getAuthorizationParameters()
Specified by:
getAuthorizationParameters in interface AuthorizationRequest

getApprovalParameters

public Map<String,String> getApprovalParameters()
Specified by:
getApprovalParameters in interface AuthorizationRequest

getClientId

public String getClientId()
Specified by:
getClientId in interface AuthorizationRequest

getScope

public Set<String> getScope()
Specified by:
getScope in interface AuthorizationRequest

getResourceIds

public Set<String> getResourceIds()
Specified by:
getResourceIds in interface AuthorizationRequest

getAuthorities

public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
Specified by:
getAuthorities in interface AuthorizationRequest

isApproved

public boolean isApproved()
Specified by:
isApproved in interface AuthorizationRequest

isDenied

public boolean isDenied()
Specified by:
isDenied in interface AuthorizationRequest

getState

public String getState()
Specified by:
getState in interface AuthorizationRequest

getRedirectUri

public String getRedirectUri()
Specified by:
getRedirectUri in interface AuthorizationRequest

getResponseTypes

public Set<String> getResponseTypes()
Specified by:
getResponseTypes in interface AuthorizationRequest

setRedirectUri

public void setRedirectUri(String redirectUri)

addClientDetails

public void addClientDetails(ClientDetails clientDetails)

setScope

public void setScope(Set<String> scope)

setResourceIds

public void setResourceIds(Set<String> resourceIds)

setApproved

public void setApproved(boolean approved)

setAuthorities

public void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)

setAuthorizationParameters

public void setAuthorizationParameters(Map<String,String> authorizationParameters)

setApprovalParameters

public void setApprovalParameters(Map<String,String> approvalParameters)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.