-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2823d85
commit 8afd81c
Showing
12 changed files
with
302 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
extensions/oidc/runtime/src/main/java/io/quarkus/oidc/TokenCertificateValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.quarkus.oidc; | ||
|
||
import java.security.cert.CertificateException; | ||
import java.security.cert.X509Certificate; | ||
import java.util.List; | ||
|
||
/** | ||
* TokenCertificateValidator can be used to verify X509 certificate chain | ||
* that is inlined in the JWT token as a 'x5c' header value. | ||
* | ||
* Use {@link TenantFeature} qualifier to bind this validator to specific OIDC tenants. | ||
*/ | ||
public interface TokenCertificateValidator { | ||
/** | ||
* Validate X509 certificate chain | ||
* | ||
* @param oidcConfig current OIDC tenant configuration. | ||
* @param chain the certificate chain. The first element in the list is a leaf certificate, the last element - the root | ||
* certificate. | ||
* @param tokenClaims the decoded JWT token claims in JSON format. If necessary, implementations can convert it to JSON | ||
* object. | ||
* @throws {@link CertificateException} if the certificate chain validation has failed. | ||
*/ | ||
void validate(OidcTenantConfig oidcConfig, List<X509Certificate> chain, String tokenClaims) throws CertificateException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.