Class AuthTokenBuilder.FluentHelperUnsignedJwt

java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.AuthTokenBuilder.FluentHelperUnsignedJwt
Enclosing class:
AuthTokenBuilder

public static class AuthTokenBuilder.FluentHelperUnsignedJwt extends Object
  • Constructor Details

    • FluentHelperUnsignedJwt

      public FluentHelperUnsignedJwt()
  • Method Details

    • ofTenant

      @Nonnull public AuthTokenBuilder.FluentHelperBuild ofTenant(@Nonnull String tenantId, @Nonnull String subdomain) throws CloudPlatformException
      A non-validated JWT is constructed based on tenant information (xsappname and issuer URL of subscriber in VCAP_SERVICES environment variable). This artificial JWT can be used in the execute methods of AuthTokenAccessor so that operations in this context are executed on behalf of the subscriber tenant provided. The generated JWT contains default values for issuer URL and audience.
      Parameters:
      tenantId - The tenant or zone identifier to be used and acted on behalf of.
      subdomain - The subdomain of the tenant/zone to act on behalf of.
      Returns:
      A fluent helper to chain operations.
      Throws:
      CloudPlatformException - If there is an issue retrieving the required tenant information.
    • ofTenant

      @Nonnull public AuthTokenBuilder.FluentHelperBuild ofTenant(@Nullable String tenantId, @Nullable URI issuerUri, @Nullable Collection<String> audiences)
      A non-validated JWT is constructed based on tenant information. This artificial JWT can be used in the execute methods of AuthTokenAccessor so that operations in this context are executed on behalf of the subscriber tenant provided.
      Parameters:
      tenantId - The tenant identifier to be used and acted on behalf of.
      issuerUri - The issuer URL of the subscriber OAuth2 endpoint.
      audiences - A customizable array of JWT audience entries. Adding the application name is recommended.
      Returns:
      A fluent helper to chain operations.