GafaelfawrStorageClient¶
- class controller.storage.gafaelfawr.GafaelfawrStorageClient(config, http_client, logger)¶
Bases:
object
Get user information from Gafaelfawr.
- Parameters:
config (
Config
) – Lab controller configuration.http_client (
AsyncClient
) – Shared HTTP client.logger (
BoundLogger
) – Logger for messages.
Methods Summary
get_user_info
(token)Get user information for the user identified by a token.
Methods Documentation
- async get_user_info(token)¶
Get user information for the user identified by a token.
- Parameters:
token (
str
) – Gafaelfawr token for user.- Returns:
User metadata.
- Return type:
- Raises:
GafaelfawrParseError – Raised if the Gafaelfawr response could not be parsed.
GafaelfawrWebError – Raised if the token could not be validated with Gafaelfawr.
InvalidTokenError – Raised if the token was rejected by Gafaelfawr.