com.atlassian.sal.api.auth
Interface AuthenticationController


public interface AuthenticationController

Allows the host application to communicate about when authentication should be performed and users allowed to login.

Since:
2.0

Method Summary
 boolean canLogin(Principal principal, javax.servlet.http.HttpServletRequest request)
          Check whether the given principal can log into the application for the current request.
 boolean shouldAttemptAuthentication(javax.servlet.http.HttpServletRequest request)
          Check whether or not authentication should be tried.
 

Method Detail

shouldAttemptAuthentication

boolean shouldAttemptAuthentication(javax.servlet.http.HttpServletRequest request)
Check whether or not authentication should be tried. Typically this will return true if the current principal is not already authenticated.

Parameters:
request - the current HttpServletRequest
Returns:
true if authentication should be tried, false otherwise.

canLogin

boolean canLogin(Principal principal,
                 javax.servlet.http.HttpServletRequest request)
Check whether the given principal can log into the application for the current request.

Parameters:
principal - the identified principal
request - the current HttpServletRequest
Returns:
true if the principal is allowed to login for the given request, false otherwise.


Copyright © 2010 Atlassian. All Rights Reserved.