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
Modifier and TypeFieldDescriptionstatic final String
The name of the header that contains the Deploy with Confidence JWT token issued by IAS.static final String
The name of the header that contains the Deploy with Confidence JWT token.static final String
The name of the header that contains the Deploy with Confidence scopes information.static final String
The name of the header that contains the Deploy with Confidence tenant information.static final String
The name of the header that contains the Deploy with Confidence user (princial) information. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
This method fetches the value of theDWC_JWT_HEADER
header or throws anDwcHeaderNotFoundException
if the header was not found.static String
This method fetches the value of theDWC_USER_HEADER
header or throws anDwcHeaderNotFoundException
if the header was not found.static String
This method fetches the value of theDWC_SUBDOMAIN_HEADER
header.static String
This method fetches the value of theDWC_SUBDOMAIN_HEADER
header or throws anDwcHeaderNotFoundException
if the header was not found.static String
This method fetches the value of theDWC_TENANT_HEADER
header or throws anDwcHeaderNotFoundException
if 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_HEADER
header or throws anDwcHeaderNotFoundException
if the header was not found.- Returns:
- The value of the
DWC_TENANT_HEADER
header. - Throws:
DwcHeaderNotFoundException
- if the header was not found.
-
getDwCSubdomainOrThrow
This method fetches the value of theDWC_SUBDOMAIN_HEADER
header or throws anDwcHeaderNotFoundException
if the header was not found.- Returns:
- The value of the
DWC_SUBDOMAIN_HEADER
header. - Throws:
DwcHeaderNotFoundException
- if the header was not found.
-
getDwCSubdomainOrNull
This method fetches the value of theDWC_SUBDOMAIN_HEADER
header. If the header is not present,null
will be returned instead.- Returns:
- Either the value of the
DWC_SUBDOMAIN_HEADER
header, ornull
if the header is not present. - Since:
- 5.6.0
-
getDwcPrincipalIdOrThrow
This method fetches the value of theDWC_USER_HEADER
header or throws anDwcHeaderNotFoundException
if the header was not found.- Returns:
- The value of the
DWC_USER_HEADER
header. - Throws:
DwcHeaderNotFoundException
- if the header was not found.
-
getDwcJwtOrThrow
This method fetches the value of theDWC_JWT_HEADER
header or throws anDwcHeaderNotFoundException
if the header was not found.- Returns:
- The value of the
DWC_JWT_HEADER
header. - Throws:
DwcHeaderNotFoundException
- if the header was not found.- Since:
- 5.6.0
-