org.springframework.security.oauth2.client.token
Class DefaultAccessTokenRequest

java.lang.Object
  extended by org.springframework.security.oauth2.client.token.DefaultAccessTokenRequest
All Implemented Interfaces:
Map<String,List<String>>, AccessTokenRequest, MultiValueMap<String,String>

public class DefaultAccessTokenRequest
extends Object
implements AccessTokenRequest

Local context for an access token request encapsulating the parameters that are sent by the client requesting the token, as opposed to the more static variables representing the client itself and the resource being targeted.

Author:
Dave Syer

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
DefaultAccessTokenRequest()
           
DefaultAccessTokenRequest(Map<String,String[]> parameters)
           
 
Method Summary
 void add(String key, String value)
           
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<String,List<String>>> entrySet()
           
 boolean equals(Object o)
           
 List<String> get(Object key)
           
 String getAuthorizationCode()
          The authorization code for this context.
 String getCookie()
           
 String getCurrentUri()
          The current URI that is being handled on the client.
 OAuth2AccessToken getExistingToken()
           
 String getFirst(String key)
           
 Object getPreservedState()
           
 String getStateKey()
           
 int hashCode()
           
 boolean isEmpty()
           
 boolean isError()
           
 Set<String> keySet()
           
 List<String> put(String key, List<String> value)
           
 void putAll(Map<? extends String,? extends List<String>> m)
           
 List<String> remove(Object key)
           
 void set(String key, String value)
           
 void setAll(Map<String,String> values)
           
 void setAuthorizationCode(String code)
           
 void setCookie(String cookie)
           
 void setCurrentUri(String uri)
           
 void setExistingToken(OAuth2AccessToken existingToken)
           
 void setPreservedState(Object state)
           
 void setStateKey(String state)
           
 int size()
           
 Map<String,String> toSingleValueMap()
           
 String toString()
           
 Collection<List<String>> values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultAccessTokenRequest

public DefaultAccessTokenRequest()

DefaultAccessTokenRequest

public DefaultAccessTokenRequest(Map<String,String[]> parameters)
Method Detail

isError

public boolean isError()
Specified by:
isError in interface AccessTokenRequest

getPreservedState

public Object getPreservedState()
Specified by:
getPreservedState in interface AccessTokenRequest

setPreservedState

public void setPreservedState(Object state)
Specified by:
setPreservedState in interface AccessTokenRequest

getStateKey

public String getStateKey()
Specified by:
getStateKey in interface AccessTokenRequest

setStateKey

public void setStateKey(String state)
Specified by:
setStateKey in interface AccessTokenRequest

getCurrentUri

public String getCurrentUri()
The current URI that is being handled on the client.

Specified by:
getCurrentUri in interface AccessTokenRequest
Returns:
The URI.

setCurrentUri

public void setCurrentUri(String uri)
Specified by:
setCurrentUri in interface AccessTokenRequest

getAuthorizationCode

public String getAuthorizationCode()
The authorization code for this context.

Specified by:
getAuthorizationCode in interface AccessTokenRequest
Returns:
The authorization code, or null if none.

setAuthorizationCode

public void setAuthorizationCode(String code)
Specified by:
setAuthorizationCode in interface AccessTokenRequest

setCookie

public void setCookie(String cookie)
Specified by:
setCookie in interface AccessTokenRequest

getCookie

public String getCookie()
Specified by:
getCookie in interface AccessTokenRequest

setExistingToken

public void setExistingToken(OAuth2AccessToken existingToken)
Specified by:
setExistingToken in interface AccessTokenRequest

getExistingToken

public OAuth2AccessToken getExistingToken()
Specified by:
getExistingToken in interface AccessTokenRequest

getFirst

public String getFirst(String key)
Specified by:
getFirst in interface MultiValueMap<String,String>

add

public void add(String key,
                String value)
Specified by:
add in interface MultiValueMap<String,String>

set

public void set(String key,
                String value)
Specified by:
set in interface MultiValueMap<String,String>

setAll

public void setAll(Map<String,String> values)
Specified by:
setAll in interface MultiValueMap<String,String>

toSingleValueMap

public Map<String,String> toSingleValueMap()
Specified by:
toSingleValueMap in interface MultiValueMap<String,String>

size

public int size()
Specified by:
size in interface Map<String,List<String>>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,List<String>>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<String,List<String>>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<String,List<String>>

get

public List<String> get(Object key)
Specified by:
get in interface Map<String,List<String>>

put

public List<String> put(String key,
                        List<String> value)
Specified by:
put in interface Map<String,List<String>>

remove

public List<String> remove(Object key)
Specified by:
remove in interface Map<String,List<String>>

putAll

public void putAll(Map<? extends String,? extends List<String>> m)
Specified by:
putAll in interface Map<String,List<String>>

clear

public void clear()
Specified by:
clear in interface Map<String,List<String>>

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,List<String>>

values

public Collection<List<String>> values()
Specified by:
values in interface Map<String,List<String>>

entrySet

public Set<Map.Entry<String,List<String>>> entrySet()
Specified by:
entrySet in interface Map<String,List<String>>

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<String,List<String>>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,List<String>>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.