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

    Modifier and Type
    Method
    Description
    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 Details

    • 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.