public class OAuthParameters extends Object implements OAuthResourceDefs
ACCESS_TOKEN, CLIENT_ID, CLIENT_SECRET, CODE, ERROR, ERROR_DESC, ERROR_URI, EXPIRES_IN, GRANT_TYPE, PASSWORD, REDIR_URI, REFRESH_TOKEN, RESPONSE_TYPE, SCOPE, STATE, TOKEN_TYPE, TOKEN_TYPE_BEARER, TOKEN_TYPE_MAC, USERNAME
Constructor and Description |
---|
OAuthParameters()
Constructor.
|
public OAuthParameters add(String name, String value)
name
- The name of the parameter.value
- The value of the parameter.public OAuthParameters code(String code)
OAuthResourceDefs.CODE
parameter.code
- The value of the parameter.public OAuthParameters grantType(GrantType grantType)
OAuthResourceDefs.GRANT_TYPE
parameter.grantType
- The value of the parameter.public OAuthParameters password(String password)
OAuthResourceDefs.PASSWORD
parameter.password
- The value of the parameter.public OAuthParameters redirectURI(String redirectURI)
OAuthResourceDefs.REDIR_URI
parameter.redirectURI
- The value of the parameter.public OAuthParameters refreshToken(String refreshToken)
OAuthResourceDefs.REFRESH_TOKEN
parameter.refreshToken
- The value of the parameter.public OAuthParameters responseType(ResponseType responseType)
OAuthResourceDefs.RESPONSE_TYPE
parameter.responseType
- The value of the parameter.public OAuthParameters scope(String[] scope)
OAuthResourceDefs.SCOPE
parameter.scope
- The value of the parameter.public OAuthParameters state(String state)
OAuthResourceDefs.STATE
parameter.state
- The value of the parameter.protected Form toForm()
public Reference toReference(String uri)
uri
- The URI to complete.public Representation toRepresentation()
public OAuthParameters username(String username)
OAuthResourceDefs.USERNAME
parameter.username
- The value of the parameter.Copyright © 2005-2015 Restlet.