Authentication#
Vecworks provides various general utilities to ease accessing resources requiring authentication.
- type vecworks.auth.Authenticator = Callable[[Middleware], AuthenticationDetails]#
Callable invoked when seeking access to an external resource.
- vecworks.auth.UsernameCredentials(username: str, password: str | None = None) AuthenticationDetails #
Generates an
Authenticator
that generates authentication details with the given username and password.Parameters#
- username
Username with which to authenticate against the external resource.
- password
Password with which to authenticate against the external resource.
- vecworks.auth.TokenCredentials(token: str = None) AuthenticationDetails #
Generates an
Authenticator
that generates authentication details with the given tokenParameters#
- token
Token with which to authenticate against the external resource.
- class vecworks.auth.AuthenticationDetails#
Holds authentication details that may be retrieved by an
Authenticator
.Properties#
- password: str | None = None#
Password with which to authenticate against the external resource.
- token: str | None = None#
Access token with which to authenticate against the external resource.
- username: str | None = None#
Username with which to authenticate against the external resource.