MAAS-specific helpers for User.
Functions
create_auth_token(user) | Create new Token and Consumer (OAuth authorisation) for user. |
create_user(sender, instance, created, **kwargs) | |
get_auth_tokens(user) | Fetches all the user’s OAuth tokens. |
get_creds_tuple(token) | Return API credentials as tuple, as used in MAASOAuth. |
Classes
Consumer(*args, **kwargs) | Consumer(id, name, description, key, secret, status, user_id) |
Token(*args, **kwargs) | Token(id, key, secret, verifier, token_type, timestamp, is_approved, user_id, consumer_id, callback, callback_confirmed) |
Create new Token and Consumer (OAuth authorisation) for user.
Parameters: | user (User) – The user to create a token for. |
---|---|
Returns: | The created Token. |
Return type: | piston.models.Token |
Fetches all the user’s OAuth tokens.
Returns: | A QuerySet of the tokens. |
---|---|
Return type: | django.db.models.query.QuerySet |