rasenmaeher_api.jwtinit

Init JWT issuer

Module Contents

Functions

_check_public_keys_tilauspalvelu(pubkeydir)

handle TILAUSPALVELU public key

_check_public_keys_kraftwerk(pubkeydir)

Handle KRAFTWERK Public Keys copy

resolve_pubkeydir()

Resolve the directory for public keys and make sure it exists

check_public_keys()

Check public keys

check_private_key()

Check that we instantiate the issuer

check_jwt_init()

Check that we have key we can use for issuing and decoding JWTs

resolve_rm_jwt_privkey_path()

resolve the path for the private key

resolve_rm_jwt_pubkey_path([expect_name])

resolve the path for the public key

jwt_init()

If needed: Create keypair

Attributes

LOGGER

DEFAULT_KEY_PATH

DEFAULT_PUB_PATH

KRAFTWERK_KEYS_PATH

HTTP_TIMEOUT

LOGGER[source]
DEFAULT_KEY_PATH[source]
DEFAULT_PUB_PATH[source]
KRAFTWERK_KEYS_PATH[source]
HTTP_TIMEOUT = 2.0[source]
_check_public_keys_tilauspalvelu(pubkeydir)[source]

handle TILAUSPALVELU public key

Parameters:

pubkeydir (pathlib.Path)

Return type:

None

_check_public_keys_kraftwerk(pubkeydir)[source]

Handle KRAFTWERK Public Keys copy

Parameters:

pubkeydir (pathlib.Path)

Return type:

None

resolve_pubkeydir()[source]

Resolve the directory for public keys and make sure it exists

Return type:

pathlib.Path

check_public_keys()[source]

Check public keys

Return type:

bool

check_private_key()[source]

Check that we instantiate the issuer

Return type:

bool

check_jwt_init()[source]

Check that we have key we can use for issuing and decoding JWTs

Return type:

bool

resolve_rm_jwt_privkey_path()[source]

resolve the path for the private key

Return type:

pathlib.Path

resolve_rm_jwt_pubkey_path(expect_name=None)[source]

resolve the path for the public key

Parameters:

expect_name (Optional[str])

Return type:

pathlib.Path

async jwt_init()[source]

If needed: Create keypair

Return type:

None