Search in sources :

Example 1 with UrlJwkProvider

use of com.auth0.jwk.UrlJwkProvider in project tutorials by eugenp.

the class OpenIdConnectFilter method verifier.

private RsaVerifier verifier(String kid) throws Exception {
    JwkProvider provider = new UrlJwkProvider(new URL(jwkUrl));
    Jwk jwk = provider.get(kid);
    return new RsaVerifier((RSAPublicKey) jwk.getPublicKey());
}
Also used : RsaVerifier(org.springframework.security.jwt.crypto.sign.RsaVerifier) UrlJwkProvider(com.auth0.jwk.UrlJwkProvider) JwkProvider(com.auth0.jwk.JwkProvider) UrlJwkProvider(com.auth0.jwk.UrlJwkProvider) URL(java.net.URL) Jwk(com.auth0.jwk.Jwk)

Aggregations

Jwk (com.auth0.jwk.Jwk)1 JwkProvider (com.auth0.jwk.JwkProvider)1 UrlJwkProvider (com.auth0.jwk.UrlJwkProvider)1 URL (java.net.URL)1 RsaVerifier (org.springframework.security.jwt.crypto.sign.RsaVerifier)1