org.springframework.security.oauth.provider
Class UnauthenticatedRequestTokenProcessingFilter

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

public class UnauthenticatedRequestTokenProcessingFilter
extends OAuthProviderProcessingFilter

Processing filter for handling a request for an OAuth token. The default implementation assumes a request for a new unauthenticated request token. The default processes URL is "/oauth_request_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
UnauthenticatedRequestTokenProcessingFilter()
           
 
Method Summary
protected  OAuthProviderToken createOAuthToken(ConsumerAuthentication authentication)
          Create the OAuth token for the specified consumer key.
 int getOrder()
          The request token filter comes after the exception translation filter.
 java.lang.String getResponseContentType()
          The content type of the response.
protected  void onNewTimestamp()
          Logic to be performed on a new timestamp.
protected  void onValidSignature(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
          Logic executed on valid signature.
 void setResponseContentType(java.lang.String responseContentType)
          The content type of the response.
 
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, validateOAuthParams, 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

UnauthenticatedRequestTokenProcessingFilter

public UnauthenticatedRequestTokenProcessingFilter()
Method Detail

onValidSignature

protected void onValidSignature(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                javax.servlet.FilterChain chain)
                         throws java.io.IOException
Description copied from class: OAuthProviderProcessingFilter
Logic executed on valid signature. The security context can be assumed to hold a verified, authenticated ConsumerAuthentication.

Default implementation continues the chain.

Specified by:
onValidSignature in class OAuthProviderProcessingFilter
Parameters:
request - The request.
response - The response
chain - The filter chain.
Throws:
java.io.IOException

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 OAuthProviderProcessingFilter
Throws:
org.springframework.security.AuthenticationException - If the timestamp shouldn't be new.

createOAuthToken

protected OAuthProviderToken createOAuthToken(ConsumerAuthentication authentication)
Create the OAuth token for the specified consumer key.

Parameters:
authentication - The authentication request.
Returns:
The OAuth token.

getOrder

public int getOrder()
The request token filter comes after the exception translation filter.

Returns:
The request token filter comes after the exception translation filter.

getResponseContentType

public java.lang.String getResponseContentType()
The content type of the response.

Returns:
The content type of the response.

setResponseContentType

public void setResponseContentType(java.lang.String responseContentType)
The content type of the response.

Parameters:
responseContentType - The content type of the response.


Copyright © 2008. All Rights Reserved.