Package org.jenkinsci.plugins.oic
Class OicJsonWebTokenVerifier
java.lang.Object
com.google.api.client.auth.openidconnect.IdTokenVerifier
org.jenkinsci.plugins.oic.OicJsonWebTokenVerifier
public class OicJsonWebTokenVerifier
extends com.google.api.client.auth.openidconnect.IdTokenVerifier
Extend IdTokenVerifier to verify UserInfo webtoken
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.api.client.auth.openidconnect.IdTokenVerifier
com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder -
Field Summary
Fields inherited from class com.google.api.client.auth.openidconnect.IdTokenVerifier
DEFAULT_TIME_SKEW_SECONDS -
Constructor Summary
ConstructorsConstructorDescriptionDefault verifierOicJsonWebTokenVerifier(String jwksServerUrl, com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder builder) Verifier with custom builder -
Method Summary
Modifier and TypeMethodDescriptionbooleanJWKS verfication enabled - for tests onlybooleanverifyIdToken(com.google.api.client.auth.openidconnect.IdToken idToken) Verify real idtokenprotected booleanverifyPayload(com.google.api.client.auth.openidconnect.IdToken idToken) hack: verify payload only if idtoken is not userinfobooleanverifyUserInfo(com.google.api.client.json.webtoken.JsonWebSignature userinfo) Verify userinfo jwt tokenMethods inherited from class com.google.api.client.auth.openidconnect.IdTokenVerifier
getAcceptableTimeSkewSeconds, getAudience, getClock, getIssuer, getIssuers, verify, verifyOrThrow
-
Constructor Details
-
OicJsonWebTokenVerifier
public OicJsonWebTokenVerifier()Default verifier -
OicJsonWebTokenVerifier
public OicJsonWebTokenVerifier(String jwksServerUrl, com.google.api.client.auth.openidconnect.IdTokenVerifier.Builder builder) Verifier with custom builder
-
-
Method Details
-
isJwksServerUrlAvailable
public boolean isJwksServerUrlAvailable()JWKS verfication enabled - for tests only -
verifyIdToken
public boolean verifyIdToken(com.google.api.client.auth.openidconnect.IdToken idToken) throws IOException Verify real idtoken- Throws:
IOException
-
verifyUserInfo
public boolean verifyUserInfo(com.google.api.client.json.webtoken.JsonWebSignature userinfo) throws IOException Verify userinfo jwt token- Throws:
IOException
-
verifyPayload
protected boolean verifyPayload(com.google.api.client.auth.openidconnect.IdToken idToken) hack: verify payload only if idtoken is not userinfo- Overrides:
verifyPayloadin classcom.google.api.client.auth.openidconnect.IdTokenVerifier
-