Package io.jmix.oidc.jwt
Class JmixOidcIdTokenDecoderFactory
java.lang.Object
io.jmix.oidc.jwt.JmixOidcIdTokenDecoderFactory
- All Implemented Interfaces:
org.springframework.security.oauth2.jwt.JwtDecoderFactory<org.springframework.security.oauth2.client.registration.ClientRegistration>
public class JmixOidcIdTokenDecoderFactory
extends Object
implements org.springframework.security.oauth2.jwt.JwtDecoderFactory<org.springframework.security.oauth2.client.registration.ClientRegistration>
A
JwtDecoderFactory used by OpenID Connect login for verifying ID token signatures with the keys
from the provider JWK Set endpoint.
Reproduces the behavior of the standard OidcIdTokenDecoderFactory with the default
RS256 algorithm, except that the JWK Set is loaded using the given
RestOperations, which allows configuring HTTP timeouts instead of the 500 ms defaults applied
by Spring Security. Created decoders are cached per client registration id, so the JWK Set cache inside
the decoder is reused between logins.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected final org.springframework.web.client.RestOperations -
Constructor Summary
ConstructorsConstructorDescriptionJmixOidcIdTokenDecoderFactory(org.springframework.web.client.RestOperations restOperations) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.oauth2.jwt.JwtDecoderbuildDecoder(org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration) org.springframework.security.oauth2.jwt.JwtDecodercreateDecoder(org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration)
-
Field Details
-
MISSING_SIGNATURE_VERIFIER_ERROR_CODE
- See Also:
-
restOperations
protected final org.springframework.web.client.RestOperations restOperations -
jwtDecoders
-
-
Constructor Details
-
JmixOidcIdTokenDecoderFactory
public JmixOidcIdTokenDecoderFactory(org.springframework.web.client.RestOperations restOperations)
-
-
Method Details
-
createDecoder
public org.springframework.security.oauth2.jwt.JwtDecoder createDecoder(org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration) - Specified by:
createDecoderin interfaceorg.springframework.security.oauth2.jwt.JwtDecoderFactory<org.springframework.security.oauth2.client.registration.ClientRegistration>
-
buildDecoder
protected org.springframework.security.oauth2.jwt.JwtDecoder buildDecoder(org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration)
-