Interface Application


public interface Application
Handles authentication with the backend system.
Author:
Samuel Padgett
See Also:
  • Method Details

    • getName

      String getName()
      Gets the name of the application to show in the login dialog.
      Returns:
      the application name
    • login

      void login(HttpServletRequest request, String id, String password) throws AuthenticationException
      Authenticates with the application. On errors, throws an AuthenticationException.
      Parameters:
      request - the servlet request
      id - the user's ID
      password - the user's password
      Throws:
      AuthenticationException - if authentication fails
    • isAuthenticated

      boolean isAuthenticated(HttpServletRequest request)
      Determines if the user is already authenticated with the application. If so, the OAuth provider can show a different authorization dialog that doesn't require a login.
      Parameters:
      request - the servlet request
      Returns:
      if the user is already logged in for this session
    • isAdminSession

      boolean isAdminSession(HttpServletRequest request)
      Determines if the current session is an admin session. If so, the user will be able to approve, edit, and delete OAuth consumers.
      Parameters:
      request - the HTTP request
      Returns:
      if this is an admin session
    • getRealm

      String getRealm(HttpServletRequest request)
      Gets the realm to be included in OAuth problem responses.
      Parameters:
      request - the HTTP request
      Returns:
      the realm