The three modules described here allow the persistence of configuration between execution of tools or services using this package.
By default the files described below are stored in a directory ".oauth2.rkt" within the directory specified by find-system-path with the kind value 'home-dir.
|(require oauth2/storage/config)||package: simple-oauth2|
This module provides a very simple get/put interface for configuration settings used by the package in general. The following table describes the currently used settings, with their types and default values.
The values for 'cipher-impl, 'cipher-key, and 'cipher-iv should not be modified by hand. The 'cipher-impl value determines which implementation is used to generate the 'cipher-key and 'cipher-iv which are used to encrypt/decrypt secrets in the clients and tokens files.
The values starting with 'redirect- represent the configuration for the internal web server required to host the OAuth redirect URI. The two SSL settings are paths to the corresponding files containing the certificate and key.
|(require oauth2/storage/clients)||package: simple-oauth2|
This module provides a persistence layer for client configurations (see struct client?). The value for client-secret will be encryted during set-client! and decrypted during get-client and therefore will alway be stored in encrypted form.
(set-client! a-client) → void/c
a-client : clientl?
|(require oauth2/storage/tokens)||package: simple-oauth2|
This module provides a persistence layer for authentication tokens (see struct token?). The values for token-access-token and token-refresh-token will be encryted during set-token! and decrypted during get-token and therefore will alway be stored in encrypted form.
(set-token! user-name service-name a-token) → void/c
user-name : string? service-name : string? a-token : token?