Skip to content

Conversation

@einrobin
Copy link
Contributor

Addresses #734

Still a draft since I wanna do some more testing myself, add unit tests and also write some documentation on it.

The config looks something like this:

    [auth]
    jwks_uri = "https://my-website/keys.json"
    jwks_refresh_interval = 3600 # comment out to disable continous refreshing
    # key = "/app/public.jwk"
    public = "anon"

#[derive(Default, Clone)]
pub struct KeySet {
/// Vec of an arbitrary number of Json Web Keys
pub keys: Vec<Arc<Key>>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HashMap based on kid?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about that, I'd keep it this way especially since the kid in a Key is optional and doesn't necessarily have to be unique. I don't think this matters for performance since we're probably talking about < 10 keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants