Uses of Package
com.irurueta.authserver.serviceclient.infrastructure.resourceserver

Package
Description
Non-interactive client that obtains tokens with the client credentials grant and calls the resource server.
Resource-server adapter of the service client: the documents gateways over a REST client generated from the resource server's contract, and the OAuth2 client that obtains the access token they send (client credentials grant, or token exchange on behalf of a user), authenticated with a secret, a signed assertion or a client certificate and optionally DPoP-bound.
  • Class
    Description
    Gives the access token the service client uses, for the CLI that is asked to print it.
  • Class
    Description
    How the service client authenticates at the token endpoint (service-client.auth.method).
    Lists the documents through a generated client and translates every failure into a DocumentAccessException, so no HTTP, OAuth2 or JSON type escapes through the ports.
    Maps the documents the resource server answers onto the domain.
    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).
    Creates the DPoP proofs (RFC 9449) of the service client.
    Builds the documents client of a user: its requests carry the access token that the authorization server issues in exchange for the user's own token.
    Builds the principals the authorized client manager caches tokens under.
    Resolves the key that signs the private_key_jwt assertion: the unencrypted PKCS#8 PEM RSA private key of ServiceClientKeyProperties, with its public half derived from it and the RS256 algorithm.
    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.
    Where the resource server is.
    Settings of the service client at the authorization server (service-client.auth.*).
    Private key with which the private_key_jwt assertion is signed (service-client.auth.key.*): an unencrypted RSA key in PKCS#8 PEM, given inline (the CLI profiles read it from the SERVICE_CLIENT_PRIVATE_KEY environment variable) or as the path of a file.
    Builds the OAuth2 client registrations of the service client from its settings: one for the client credentials grant and one for the token exchange grant, which share the client's identity and authentication.
    Builds the HTTP request factory that presents the client certificate: the one of the SSL bundle named by service-client.auth.ssl-bundle.
    Builds the clients of the token endpoint for the two grants, set up for the configured authentication method: the default for client_secret_basic; the signed assertion for private_key_jwt; a REST client over the SSL bundle (so the client certificate is presented) for the mutual TLS methods; plus a DPoP proof header when DPoP is enabled.