org.springframework.security.oauth.provider
Class AccessTokenProcessingFilter

java.lang.Object
  extended by org.springframework.security.oauth.provider.OAuthProviderProcessingFilter
      extended by org.springframework.security.oauth.provider.UnauthenticatedRequestTokenProcessingFilter
          extended by org.springframework.security.oauth.provider.AccessTokenProcessingFilter
All Implemented Interfaces:
javax.servlet.Filter, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware, org.springframework.core.Ordered

public class AccessTokenProcessingFilter
extends UnauthenticatedRequestTokenProcessingFilter

Processing filter for handling a request for an OAuth access token.

Author:
Ryan Heaton

Field Summary
static int FILTER_CHAIN_ORDER
           
 
Fields inherited from class org.springframework.security.oauth.provider.OAuthProviderProcessingFilter
messages, OAUTH_PROCESSING_HANDLED
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
AccessTokenProcessingFilter()
           
 
Method Summary
protected  OAuthProviderToken createOAuthToken(ConsumerAuthentication authentication)
          Create the OAuth token for the specified consumer key.
 int getOrder()
          The access token filter comes after the user authorization filter.
protected  void onNewTimestamp()
          Logic to be performed on a new timestamp.
protected  void validateOAuthParams(ConsumerDetails consumerDetails, java.util.Map<java.lang.String,java.lang.String> oauthParams)
          Validates the OAuth parameters for the given consumer.
 
Methods inherited from class org.springframework.security.oauth.provider.UnauthenticatedRequestTokenProcessingFilter
getResponseContentType, onValidSignature, setResponseContentType
 
Methods inherited from class org.springframework.security.oauth.provider.OAuthProviderProcessingFilter
afterPropertiesSet, allowMethod, createDetails, destroy, doFilter, fail, getAuthenticationEntryPoint, getConsumerDetailsService, getFilterProcessesUrl, getNonceServices, getProviderSupport, getSignatureMethodFactory, getTokenServices, init, isIgnoreMissingCredentials, requiresAuthentication, resetPreviousAuthentication, setAllowedMethods, setAuthenticationEntryPoint, setConsumerDetailsService, setFilterProcessesUrl, setIgnoreMissingCredentials, setMessageSource, setNonceServices, setProviderSupport, setSignatureMethodFactory, setTokenServices, skipProcessing, validateSignature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILTER_CHAIN_ORDER

public static final int FILTER_CHAIN_ORDER
Constructor Detail

AccessTokenProcessingFilter

public AccessTokenProcessingFilter()
Method Detail

createOAuthToken

protected OAuthProviderToken createOAuthToken(ConsumerAuthentication authentication)
Description copied from class: UnauthenticatedRequestTokenProcessingFilter
Create the OAuth token for the specified consumer key.

Overrides:
createOAuthToken in class UnauthenticatedRequestTokenProcessingFilter
Parameters:
authentication - The authentication request.
Returns:
The OAuth token.

validateOAuthParams

protected void validateOAuthParams(ConsumerDetails consumerDetails,
                                   java.util.Map<java.lang.String,java.lang.String> oauthParams)
                            throws InvalidOAuthParametersException
Description copied from class: OAuthProviderProcessingFilter
Validates the OAuth parameters for the given consumer. Base implementation validates only those parameters that are required for all OAuth requests. This includes the nonce and timestamp, but not the signature.

Overrides:
validateOAuthParams in class OAuthProviderProcessingFilter
Parameters:
consumerDetails - The consumer details.
oauthParams - The OAuth parameters to validate.
Throws:
InvalidOAuthParametersException - If the OAuth parameters are invalid.

onNewTimestamp

protected void onNewTimestamp()
                       throws org.springframework.security.AuthenticationException
Description copied from class: OAuthProviderProcessingFilter
Logic to be performed on a new timestamp. The default behavior expects that the timestamp should not be new.

Overrides:
onNewTimestamp in class UnauthenticatedRequestTokenProcessingFilter
Throws:
org.springframework.security.AuthenticationException - If the timestamp shouldn't be new.

getOrder

public int getOrder()
The access token filter comes after the user authorization filter.

Specified by:
getOrder in interface org.springframework.core.Ordered
Overrides:
getOrder in class UnauthenticatedRequestTokenProcessingFilter
Returns:
The access token filter comes after the user authorization filter.


Copyright © 2008. All Rights Reserved.