Class DocumentsApis
java.lang.Object
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.DocumentsApis
Builds the documents client generated from the resource server's contract on top of a REST client that sends the
access token of an authorized client (so the generated client's own authentication settings stay unused).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceServerInterceptorsInterceptors that obtain and send the access token.private final ResourceServerPropertiesWhere the resource server is.private final SslRequestFactoriesRequest factory over the SSL bundle, when there is one.private final org.springframework.web.client.RestClient.BuilderTemplate of the REST clients; it is never used itself, only copied (the builder is a prototype bean). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforPrincipal(String registrationId, org.springframework.security.core.Authentication principal) Builds a documents client whose requests carry the access token of one authorized client.
-
Field Details
-
restClientBuilder
private final org.springframework.web.client.RestClient.Builder restClientBuilderTemplate of the REST clients; it is never used itself, only copied (the builder is a prototype bean). -
properties
Where the resource server is. -
requestFactories
Request factory over the SSL bundle, when there is one. -
interceptors
Interceptors that obtain and send the access token.
-
-
Constructor Details
-
DocumentsApis
public DocumentsApis()
-
-
Method Details
-
forPrincipal
public DocumentsApi forPrincipal(String registrationId, org.springframework.security.core.Authentication principal) Builds a documents client whose requests carry the access token of one authorized client.- Parameters:
registrationId- registration of the OAuth2 client that obtains the token.principal- principal the token is cached under (the service client, or a user for a token exchange).- Returns:
- the documents client.
-