public class ScpNeoTenantFacade extends DefaultTenantFacade implements WithRuntimeDependencies
Constructor and Description |
---|
ScpNeoTenantFacade() |
Modifier and Type | Method and Description |
---|---|
void |
assertRuntimeDependenciesExist()
Asserts that required runtime dependencies are available on the class path.
|
io.vavr.control.Try<Tenant> |
tryGetCurrentTenant()
Returns a
Try of the current Tenant . |
public void assertRuntimeDependenciesExist() throws DependencyNotFoundException
assertRuntimeDependenciesExist
in interface WithRuntimeDependencies
DependencyNotFoundException
- If a required runtime dependency is not available.@Nonnull public io.vavr.control.Try<Tenant> tryGetCurrentTenant()
Try
of the current Tenant
.
On SAP Cloud Platform, the availability of a tenant is defined as follows:
Tenant available | Tenant not available | |
---|---|---|
SAP Cloud Platform Cloud Foundry | A request is present with an "Authorization" header that contains a valid JWT bearer with field "zid". As a fallback a JWT will be retrieved from a bound XSUAA instance. |
A request is not available, no "Authorization" header is present in the current request, the JWT bearer does not hold a field "zid", or there is no XSUAA service bound to this application. |
SAP Cloud Platform Neo | Successful JNDI lookup of TenantContext (part of Neo SDK, com.sap.cloud.account.TenantContext). | Never. If correctly configured, a TenantContext is always available. If not, a TenantAccessException
is thrown. |
tryGetCurrentTenant
in interface TenantFacade
tryGetCurrentTenant
in class DefaultTenantFacade
Try
of the current Tenant
.Copyright © 2020 SAP SE. All rights reserved.