Spring Social

org.springframework.social.oauth2
Class OAuth2Parameters

java.lang.Object
  extended by org.springframework.social.support.ParameterMap
      extended by org.springframework.social.oauth2.OAuth2Parameters
All Implemented Interfaces:
java.util.Map<java.lang.String,java.util.List<java.lang.String>>, org.springframework.util.MultiValueMap<java.lang.String,java.lang.String>

public final class OAuth2Parameters
extends ParameterMap

Parameters for building an OAuth2 authorize URL.

Author:
Roy Clarkson
See Also:
OAuth2Operations.buildAuthorizeUrl(GrantType, OAuth2Parameters)

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
OAuth2Parameters()
          Creates a new OAuth2Parameters map that is initially empty.
OAuth2Parameters(java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
          Creates a new OAuth2Parameters populated from the initial parameters provided.
 
Method Summary
 java.lang.String getRedirectUri()
          The authorization callback url.
 java.lang.String getScope()
          The permissions the application is seeking with the authorization (optional).
 java.lang.String getState()
          An opaque key that must be included in the provider's authorization callback (optional).
 void setRedirectUri(java.lang.String redirectUri)
          Sets the authorization callback url.
 void setScope(java.lang.String scope)
          Sets the permissions the application is seeking with the authorization (optional).
 void setState(java.lang.String state)
          Sets an opaque key that must be included in the provider's authorization callback (optional).
 
Methods inherited from class org.springframework.social.support.ParameterMap
add, clear, containsKey, containsValue, entrySet, get, getFirst, isEmpty, keySet, put, putAll, remove, set, setAll, size, toSingleValueMap, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

OAuth2Parameters

public OAuth2Parameters()
Creates a new OAuth2Parameters map that is initially empty. Use the setter methods to add parameters after construction.

See Also:
setRedirectUri(String), setScope(String), setState(String), ParameterMap.set(String, String)

OAuth2Parameters

public OAuth2Parameters(java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
Creates a new OAuth2Parameters populated from the initial parameters provided.

Parameters:
parameters - the initial parameters
See Also:
setRedirectUri(String), setScope(String), setState(String)
Method Detail

getRedirectUri

public java.lang.String getRedirectUri()
The authorization callback url. This value must match the redirectUri registered with the provider. This is optional per the OAuth 2 spec, but required by most OAuth 2 providers.


setRedirectUri

public void setRedirectUri(java.lang.String redirectUri)
Sets the authorization callback url. This value must match the redirectUri registered with the provider. This is optional per the OAuth 2 spec, but required by most OAuth 2 providers.


getScope

public java.lang.String getScope()
The permissions the application is seeking with the authorization (optional).


setScope

public void setScope(java.lang.String scope)
Sets the permissions the application is seeking with the authorization (optional).


getState

public java.lang.String getState()
An opaque key that must be included in the provider's authorization callback (optional).


setState

public void setState(java.lang.String state)
Sets an opaque key that must be included in the provider's authorization callback (optional).


Spring Social