Class OAuth1aRequestFilter
- java.lang.Object
-
- com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.auth.OAuth1aRequestFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class OAuth1aRequestFilter extends Object implements javax.servlet.Filter
Identifies every incoming request to check if it is an OAuth request. For an OAuth request, it follows the OAuth 1.0a specification of checking request signature and verifying the access token. After successful validation, it delegates toTrustedUnderlyingSystemAuthorizerFilter
to establish user context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OAuth1aRequestFilter.OAuthWWWAuthenticateAddingResponse
Wraps a HttpServletResponse and listens for the status to be set to a "401 Not authorized" or a 401 error to be sent so that it can add the WWW-Authenticate headers for OAuth.
-
Field Summary
Fields Modifier and Type Field Description static String
OAUTH_REQUEST_AUTHENTICATED_ATTRIBUTE_KEY
-
Constructor Summary
Constructors Constructor Description OAuth1aRequestFilter(OAuth1Authenticator authenticator, TrustedUnderlyingSystemAuthorizerFilter authorizerFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
void
init(javax.servlet.FilterConfig filterConfig)
-
-
-
Field Detail
-
OAUTH_REQUEST_AUTHENTICATED_ATTRIBUTE_KEY
public static final String OAUTH_REQUEST_AUTHENTICATED_ATTRIBUTE_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OAuth1aRequestFilter
@Inject public OAuth1aRequestFilter(OAuth1Authenticator authenticator, TrustedUnderlyingSystemAuthorizerFilter authorizerFilter)
-
-
Method Detail
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.servlet.Filter
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
- Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
init
public void init(javax.servlet.FilterConfig filterConfig)
- Specified by:
init
in interfacejavax.servlet.Filter
-
-