org.springframework.security.oauth.provider
Class ConsumerAuthentication

java.lang.Object
  extended by org.springframework.security.authentication.AbstractAuthenticationToken
      extended by org.springframework.security.oauth.provider.ConsumerAuthentication
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class ConsumerAuthentication
extends org.springframework.security.authentication.AbstractAuthenticationToken

Authentication for an OAuth consumer.

Author:
Ryan Heaton
See Also:
Serialized Form

Constructor Summary
ConsumerAuthentication(ConsumerDetails consumerDetails, ConsumerCredentials consumerCredentials)
           
ConsumerAuthentication(ConsumerDetails consumerDetails, ConsumerCredentials consumerCredentials, Map<String,String> oauthParams)
           
 
Method Summary
 ConsumerCredentials getConsumerCredentials()
          The credentials of this authentication.
 ConsumerDetails getConsumerDetails()
          The consumer details.
 Object getCredentials()
          The credentials.
 String getName()
          The name of this principal is the consumer key.
 Map<String,String> getOAuthParameters()
          Get the oauth parameters supplied in the request.
 Object getPrincipal()
          The principal (consumer details).
 boolean isAuthenticated()
          Whether the signature has been validated.
 boolean isSignatureValidated()
          Whether the signature has been validated.
 void setAuthenticated(boolean authenticated)
          Whether the signature has been validated.
 void setSignatureValidated(boolean signatureValidated)
          Whether the signature has been validated.
 
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, hashCode, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsumerAuthentication

public ConsumerAuthentication(ConsumerDetails consumerDetails,
                              ConsumerCredentials consumerCredentials)

ConsumerAuthentication

public ConsumerAuthentication(ConsumerDetails consumerDetails,
                              ConsumerCredentials consumerCredentials,
                              Map<String,String> oauthParams)
Method Detail

getCredentials

public Object getCredentials()
The credentials.

Returns:
The credentials.
See Also:
getConsumerCredentials()

getConsumerCredentials

public ConsumerCredentials getConsumerCredentials()
The credentials of this authentication.

Returns:
The credentials of this authentication.

getPrincipal

public Object getPrincipal()
The principal (consumer details).

Returns:
The principal.
See Also:
getConsumerDetails()

getConsumerDetails

public ConsumerDetails getConsumerDetails()
The consumer details.

Returns:
The consumer details.

getOAuthParameters

public Map<String,String> getOAuthParameters()
Get the oauth parameters supplied in the request.

Returns:
The oauth parameters.

getName

public String getName()
The name of this principal is the consumer key.

Specified by:
getName in interface Principal
Overrides:
getName in class org.springframework.security.authentication.AbstractAuthenticationToken
Returns:
The name of this principal is the consumer key.

isSignatureValidated

public boolean isSignatureValidated()
Whether the signature has been validated.

Returns:
Whether the signature has been validated.

setSignatureValidated

public void setSignatureValidated(boolean signatureValidated)
Whether the signature has been validated.

Parameters:
signatureValidated - Whether the signature has been validated.

isAuthenticated

public boolean isAuthenticated()
Whether the signature has been validated.

Specified by:
isAuthenticated in interface org.springframework.security.core.Authentication
Overrides:
isAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationToken
Returns:
Whether the signature has been validated.

setAuthenticated

public void setAuthenticated(boolean authenticated)
Whether the signature has been validated.

Specified by:
setAuthenticated in interface org.springframework.security.core.Authentication
Overrides:
setAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationToken
Parameters:
authenticated - Whether the signature has been validated.


Copyright © 2012. All Rights Reserved.