com.h3c.api.auth

## Interface AuthenticationService

- All Known Subinterfaces:
    AuthenticationClient
  All Known Implementing Classes:
    HttpAuthClient, InMemoryAuthenticationManager, KeystoneAuthenticationManager

      public interface AuthenticationService

  Authentication service facade.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Authentication` | `authenticate(String domain, String user, String password)` Authenticate against the specified domain using the supplied user name and password.
    `void` | `invalidate(String token)` Invalidates the specified authentication token.
    `Authentication` | `validate(String token)` Determines whether the specified authentication token is valid and if so, provides the associated authentication data.

- - ### Method Detail

    - #### authenticate

          Authentication authenticate(String domain,
                                    String user,
                                    String password)

      Authenticate against the specified domain using the supplied user name and password.
      Parameters:
        `domain` - authentication domain
        `user` - user name
        `password` - user password
      Returns:
        authentication containing unique identifying token and associated authentication information
      Throws:
        `AuthenticationException` - if authentication fails for some reason
        `ServiceNotFoundException` - if the required authentication service is not available

    - #### validate

          Authentication validate(String token)

      Determines whether the specified authentication token is valid and if so, provides the associated authentication data.
      Parameters:
        `token` - token to be validated
      Returns:
        authentication data associated with the given token via prior call to `authenticate(String, String, String)`
      Throws:
        `AuthenticationException` - if validation fails for some reason
        `ServiceNotFoundException` - if the required authentication service is not available

    - #### invalidate

          void invalidate(String token)

      Invalidates the specified authentication token.
      Parameters:
        `token` - token to be invalidated
      Throws:
        `AuthenticationException` - if token cannot be invalidated for some reason
        `ServiceNotFoundException` - if the required authentication service is not available

Copyright © 2014. All Rights Reserved.