module documentation
This module defines the web user interface for the ACME CSE.
| Class | |
Own request handler to redirect some logging of the http server. |
| Class | |
The web user interface for the ACME CSE. |
| Function | get |
Retrieve and return a oauth2 token. If there is a provided token that is still valid, then that token is returned. |
| Function | run |
Run the web server. |
| Type Alias | |
Type definition for flask handler. |
| Variable | console |
The ACME console for logging. |
| Variable | do |
Whether to do logging. |
| Variable | do |
Whether to use OAuth2. |
| Variable | |
Named tuple for a token. |
| Variable | _expiration |
Leeway for token expiration. |
Retrieve and return a oauth2 token. If there is a provided token that is still valid, then that token is returned.
This function returns a new named tuple Token(token, expiration), or None in case of an error. The expiration is in epoch seconds.
| Parameters | |
token:Token | None | The token to check. If None, a new token is retrieved. |
kind:str | None | The kind of token to retrieve. Currently only 'keycloak' is supported. |
| Returns | |
Token | None | The token, or None in case of an error. |
def runServer(flaskApp:
Flask, host: str, port: int, useTLS: bool, certFile: str | None = None, privateKey: str | None = None):
¶
Run the web server.
| Parameters | |
flaskFlask | The flask app to run. |
host:str | The host to bind to. |
port:int | The port to bind to. |
usebool | Whether to use TLS. |
certstr | None | The certificate file. |
privatestr | None | The private key file. |