aistore.sdk.authn.response_handler

View as Markdown

Module Contents

Classes

NameDescription
AuthNResponseHandlerHandle responses from an AuthN server

API

class aistore.sdk.authn.response_handler.AuthNResponseHandler()

Bases: ResponseHandler

Handle responses from an AuthN server

exc_class
Type[AuthNError]
aistore.sdk.authn.response_handler.AuthNResponseHandler.parse_error(
r: requests.Response
) -> aistore.sdk.authn.errors.AuthNError

Parse raw text into an appropriate AuthNError object.

Parameters:

r
requests.Response

The response from the AuthN cluster.

Raises:

  • AuthNError: If the error doesn’t match any specific conditions.
  • ErrClusterNotFound: If the error message indicates a missing cluster.
  • ErrRoleNotFound: If the error message indicates a missing role.
  • ErrUserNotFound: If the error message indicates a missing user.
  • ErrRoleAlreadyExists: If the error message indicates a role already exists.
  • ErrUserAlreadyExists: If the error message indicates a user already exists.
  • ErrClusterAlreadyRegistered: If the error message indicates the cluster is already registered.
  • ErrUserInvalidCredentials: If the error message indicates invalid user credentials.