Class ResourceServerInterceptors
java.lang.Object
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.ResourceServerInterceptors
Creates the interceptors that put the access token on the calls to the resource server: Spring Security's
OAuth2ClientHttpRequestInterceptor (bearer), or the DPoP one when service-client.auth.dpop is on. Either
way a call that ends up without a token is refused instead of sent.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.beans.factory.ObjectProvider<DPoPProofs> Creates the DPoP proofs; absent unless DPoP is enabled.private final org.springframework.security.oauth2.client.OAuth2AuthorizedClientManagerObtains and renews the access tokens. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
manager
private final org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager managerObtains and renews the access tokens. -
dpopProofs
Creates the DPoP proofs; absent unless DPoP is enabled.
-
-
Constructor Details
-
ResourceServerInterceptors
public ResourceServerInterceptors()
-
-
Method Details
-
create
public List<org.springframework.http.client.ClientHttpRequestInterceptor> create(String registrationId, org.springframework.security.core.Authentication principal) Creates the interceptors of one client.- Parameters:
registrationId- registration of the OAuth2 client that obtains the token.principal- principal the token is cached under; the CLI has no security context to read it from.- Returns:
- the interceptors, in the order they run.
-