Interface AdminAuthAPI

All Superinterfaces:
net.anotheria.anoplass.api.API
All Known Implementing Classes:
AdminAuthAPIImpl

public interface AdminAuthAPI extends net.anotheria.anoplass.api.API
API to perform authentication for admin-API.
  • Method Summary

    Modifier and Type
    Method
    Description
    Authenticates user by token.
    login(String login, String password)
    Used to initially log in user in admin-API.
    void
    Logouts user from admin-API.

    Methods inherited from interface net.anotheria.anoplass.api.API

    deInit, init
  • Method Details

    • authenticateByToken

      String authenticateByToken(String authToken) throws AdminAPIAuthenticationException
      Authenticates user by token. If token is valid, returns login and allows the further processing, otherwise throws an exception.
      Parameters:
      authToken - token to verify
      Returns:
      login in case of valid token
      Throws:
      AdminAPIAuthenticationException - in case of invalid token
    • login

      String login(String login, String password) throws AdminAPIAuthenticationException
      Used to initially log in user in admin-API. Verifies credentials and if there are valid, returns a new created authToken. If not - exception. AuthToken then is used to call secured endpoints.
      Parameters:
      login - login
      password - password
      Returns:
      token in case of valid credentials
      Throws:
      AdminAPIAuthenticationException - in case of invalid credentials
    • logout

      void logout()
      Logouts user from admin-API. Deletes current authToken.