Class OAuth1Authenticator
java.lang.Object
com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.auth.OAuth1Authenticator
Authenticates a request based on provided OAuth1 fields.
Tested by the
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth1Authenticator(ServiceProviderConsumerStore consumerStore, ServiceProviderTokenStore tokenStore, net.oauth.OAuthValidator validator, Clock clock, SecurityModeChecker securityChecker, OAuthRequestUtils oAuthRequestUtils) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) Authenticate the request.
-
Constructor Details
-
OAuth1Authenticator
@Inject public OAuth1Authenticator(ServiceProviderConsumerStore consumerStore, ServiceProviderTokenStore tokenStore, net.oauth.OAuthValidator validator, Clock clock, SecurityModeChecker securityChecker, OAuthRequestUtils oAuthRequestUtils)
-
-
Method Details
-
authenticate
@CheckForNull public User authenticate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws AuthenticationFailedException Authenticate the request.- Parameters:
req- request to validateresp- response to write errors etc to in case of failure.- Returns:
- If the request is successful the authenticated user is returned. If it is not a valid * OAuth1 request null is returned.
- Throws:
AuthenticationFailedException- Thrown to indicate that Authentication failed and the request should not be allowed to proceed
-