Class AuthTokenBuilder.FluentHelperUnsignedJwt
java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.AuthTokenBuilder.FluentHelperUnsignedJwt
- Enclosing class:
- AuthTokenBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA non-validated JWT is constructed based on tenant information (xsappnameand issuer URL of subscriber inVCAP_SERVICESenvironment variable).ofTenant(String tenantId, URI issuerUri, Collection<String> audiences) A non-validated JWT is constructed based on tenant information.
-
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 (xsappnameand issuer URL of subscriber inVCAP_SERVICESenvironment variable). This artificial JWT can be used in theexecutemethods ofAuthTokenAccessorso 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 theexecutemethods ofAuthTokenAccessorso 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.
-