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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String authenticateByToken​(java.lang.String authToken)
      Authenticates user by token.
      java.lang.String login​(java.lang.String login, java.lang.String password)
      Used to initially log in user in admin-API.
      void logout()
      Logouts user from admin-API.
      • Methods inherited from interface net.anotheria.anoplass.api.API

        deInit, init
    • Method Detail

      • authenticateByToken

        java.lang.String authenticateByToken​(java.lang.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

        java.lang.String login​(java.lang.String login,
                               java.lang.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.