Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token Refactor Step 2.2: introduce security context #3742

Closed
Tracked by #3743
paullatzelsperger opened this issue Dec 28, 2023 · 0 comments · Fixed by #3760
Closed
Tracked by #3743

Token Refactor Step 2.2: introduce security context #3742

paullatzelsperger opened this issue Dec 28, 2023 · 0 comments · Fixed by #3760
Assignees
Labels
breaking-change Will require manual intervention for version update enhancement New feature or request refactoring Cleaning up code and dependencies
Milestone

Comments

@paullatzelsperger
Copy link
Member

paullatzelsperger commented Dec 28, 2023

Feature Request

Step 2.2 of the token refactoring deals with the refactoring of the TokenValidationService. Different types of tokens require different verification and validation rules. Furthermore, resolving the public key with which to verify the token could depend on the calling code: some public keys are resolved from a DID, some are resolve from a PKI, others may be configured in the settings etc.

Which Areas Would Be Affected?

jwt-spi, oauth2-core

Why Is the Feature Desired?

the same type (as in: Java type) of token may need be validated and verified differently depending on the calling code.

Solution Proposal

public interface TokenValidationService {
    Result<ClaimToken> validate(TokenRepresentation representation, PublicKeyResolver resolver, TokenValidationRule... rules);
    Result<ClaimToken> validate(@NotNull String token, PublicKeyResolver resolver, TokenValidationRule... rules);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Will require manual intervention for version update enhancement New feature or request refactoring Cleaning up code and dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant