Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.lyo.server.oauth.core
Interface Application

    public interface Application

Handles authentication with the backend system.

Author:
  Samuel Padgett
See Also:
  `OAuthConfiguration#setApplication(Authentication)`

Method Summary
`String` | `getName()` Gets the name of the application to show in the login dialog.
`String` | `getRealm(javax.servlet.http.HttpServletRequest request)` Gets the realm to be included in OAuth problem responses.
`boolean` | `isAdminSession(javax.servlet.http.HttpServletRequest request)` Determines if the current session is an admin session.
`boolean` | `isAuthenticated(javax.servlet.http.HttpServletRequest request)` Determines if the user is already authenticated with the application.
`void` | `login(javax.servlet.http.HttpServletRequest request, String id, String password)` Authenticates with the application.

Method Detail

### getName

    String getName()

  Gets the name of the application to show in the login dialog.

  Returns:
    the application name

### login

    void login(javax.servlet.http.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(javax.servlet.http.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(javax.servlet.http.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(javax.servlet.http.HttpServletRequest request)

  Gets the realm to be included in OAuth problem responses.

  Parameters:
    `request` - the HTTP request
  Returns:
    the realm

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.