Configο
from aioauth import config
Configuration settings for aioauth server instance.
- class Settings(TOKEN_EXPIRES_IN: int = 86400, REFRESH_TOKEN_EXPIRES_IN: int = 172800, AUTHORIZATION_CODE_EXPIRES_IN: int = 300, INSECURE_TRANSPORT: bool = False, ERROR_URI: str = '', AVAILABLE: bool = True)[source]ο
Configuration options that is used by the Server class.
- TOKEN_EXPIRES_IN: int = 86400ο
Access token lifetime in seconds. Defaults to 24 hours.
- REFRESH_TOKEN_EXPIRES_IN: int = 172800ο
Refresh token lifetime in seconds. Defaults to TOKEN_EXPIRES_IN * 2 (48 hours).
- AUTHORIZATION_CODE_EXPIRES_IN: int = 300ο
Authorization code lifetime in seconds. Defaults to 5 minutes.
- INSECURE_TRANSPORT: bool = Falseο
Allow connections over SSL only.
Note
When this option is disabled server will raise βHTTP method is not allowedβ error when attempting to access the server without a valid SSL tunnel.
- ERROR_URI: str = ''ο
URI to redirect resource owner when server encounters error.
- AVAILABLE: bool = Trueο
Boolean indicating whether or not the server is available.