registry.domain module

Core domain classes for the API client registry.

See also arxiv.users.domain.

class registry.domain.AuthorizationCode[source]

Bases: tuple

An authorization code granted by a user to an API client.

client_id

The unique identifier of the API client.

code

The authorization code itself.

created

The time when the auth code was generated.

expires

The time when the auth code expires.

redirect_uri

The URI to which the user should be redirected.

scope

The scope authorized by the user.

user_email

The email address of the arXiv user granting the authorization.

user_id

The unique identifier of the arXiv user granting the authorization.

username

The username of the arXiv user granting the authorization.

class registry.domain.ClientAuthorization[source]

Bases: tuple

A specific authorization for a Client.

authorization_id

Unique identifier for the scope authorization.

authorized

The date/time when the scope was authorized.

client_id

The client to which this authorization applies.

requested

The date/time when the scope was requsted.

scope

The specific scope being granted.

class registry.domain.ClientCredential[source]

Bases: tuple

Key-pair for API client authentication.

client_id

Public identifier for the API client.

client_secret

Hashed secret key for API client authentication.

class registry.domain.ClientGrantType[source]

Bases: tuple

A grant type for which a client is authorized.

AUTHORIZATION_CODE = 'authorization_code'
CLIENT_CREDENTIALS = 'client_credentials'
GRANT_TYPES = ('authorization_code', 'implicit', 'client_credentials', 'password')
IMPLICIT = 'implicit'
PASSWORD = 'password'
authorized

The date/time when the grant type was authorized.

client_id

The client to which this authorization applies.

grant_type

Must be one of GRANT_TYPES.

grant_type_id

Unique identifier for grant type authorization.

requested

The date/time when the grant type was requsted.