Package com.sap.cloud.sdk.cloudplatform
Class DwcHeaderUtils
java.lang.Object
com.sap.cloud.sdk.cloudplatform.DwcHeaderUtils
Utility class to extract specific values from the SAP Deploy with Confidence request headers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the header that contains the Deploy with Confidence JWT token issued by IAS.static final StringThe name of the header that contains the Deploy with Confidence JWT token.static final StringThe name of the header that contains the Deploy with Confidence scopes information.static final StringThe name of the header that contains the Deploy with Confidence tenant information.static final StringThe name of the header that contains the Deploy with Confidence user (princial) information. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThis method fetches the value of theDWC_JWT_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.static StringThis method fetches the value of theDWC_USER_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.static StringThis method fetches the value of theDWC_SUBDOMAIN_HEADERheader.static StringThis method fetches the value of theDWC_SUBDOMAIN_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.static StringThis method fetches the value of theDWC_TENANT_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.
-
Field Details
-
DWC_USER_HEADER
The name of the header that contains the Deploy with Confidence user (princial) information.- See Also:
-
DWC_TENANT_HEADER
The name of the header that contains the Deploy with Confidence tenant information.- See Also:
-
DWC_SUBDOMAIN_HEADER
The name of the header that contains the Deploy with Confidence scopes information.- See Also:
-
DWC_JWT_HEADER
The name of the header that contains the Deploy with Confidence JWT token.- See Also:
-
DWC_IAS_JWT_HEADER
The name of the header that contains the Deploy with Confidence JWT token issued by IAS.- See Also:
-
-
Constructor Details
-
DwcHeaderUtils
public DwcHeaderUtils()
-
-
Method Details
-
getDwcTenantIdOrThrow
This method fetches the value of theDWC_TENANT_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.- Returns:
- The value of the
DWC_TENANT_HEADERheader. - Throws:
DwcHeaderNotFoundException- if the header was not found.
-
getDwCSubdomainOrThrow
This method fetches the value of theDWC_SUBDOMAIN_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.- Returns:
- The value of the
DWC_SUBDOMAIN_HEADERheader. - Throws:
DwcHeaderNotFoundException- if the header was not found.
-
getDwCSubdomainOrNull
This method fetches the value of theDWC_SUBDOMAIN_HEADERheader. If the header is not present,nullwill be returned instead.- Returns:
- Either the value of the
DWC_SUBDOMAIN_HEADERheader, ornullif the header is not present. - Since:
- 5.6.0
-
getDwcPrincipalIdOrThrow
This method fetches the value of theDWC_USER_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.- Returns:
- The value of the
DWC_USER_HEADERheader. - Throws:
DwcHeaderNotFoundException- if the header was not found.
-
getDwcJwtOrThrow
This method fetches the value of theDWC_JWT_HEADERheader or throws anDwcHeaderNotFoundExceptionif the header was not found.- Returns:
- The value of the
DWC_JWT_HEADERheader. - Throws:
DwcHeaderNotFoundException- if the header was not found.- Since:
- 5.6.0
-