Struct prima_bridge::auth0::Config
source · pub struct Config {
pub token_url: Url,
pub caller: String,
pub audience: String,
pub cache_type: CacheType,
pub token_encryption_key: String,
pub check_interval: Duration,
pub staleness_check_percentage: StalenessCheckPercentage,
pub client_id: String,
pub client_secret: String,
pub jwks_url: Url,
pub scope: Option<String>,
}
auth0
only.Fields§
§token_url: Url
Auth0 base url. This is the url used by the bridge to fetch new tokens
caller: String
The microservice implementing this Bridge
audience: String
The microservice I want to connect to. This should match the string defined in auth0 as “audience”
cache_type: CacheType
Cache configuration. Could be a redis connection string or inmemory cache
token_encryption_key: String
The key to use in order to encrypt CachedToken
in redis
check_interval: Duration
Every {check_interval} the TokenDispenser
actor checks if token needs to be refreshed
staleness_check_percentage: StalenessCheckPercentage
this is a time period in which the token should be considered stale. Expressed as a range that represent the whole lifespan of the token. The lower bound means that from that from that moment onward the library will try to refresh the token at the scheduled time the higher bound means that the library will try to refresh the token as soon as possible
client_id: String
Auth0 client identifier. Every machine should share the same identifier
client_secret: String
Auth0 client secret. Every machine should share the same secret
jwks_url: Url
JWKS url This is the url that the bridge uses to fetch JWKS
scope: Option<String>
Scope This is the scopes requested by the bridge when fetching tokens