public class ScpCfTenantFacade extends Object implements TenantFacade
Constructor and Description |
---|
ScpCfTenantFacade() |
Modifier and Type | Method and Description |
---|---|
Tenant |
getCurrentTenant()
Returns the current
Tenant . |
ScpCfTenant |
lookupCurrentTenant()
Retrieves the current tenant from the JWT bearer in the Authorization header of the current request.
|
public ScpCfTenant lookupCurrentTenant() throws TenantNotAvailableException, TenantAccessException
TenantNotAvailableException
- If the current tenant is not available.TenantAccessException
- If there is an issue while retrieving the user.public Tenant getCurrentTenant() throws TenantNotAvailableException, TenantAccessException
Tenant
.getCurrentTenant
in interface TenantFacade
TenantNotAvailableException
- If there is currently no Tenant
available. This typically occurs when trying to access the
tenant within code that is running outside any tenant context, e.g., within a background task.TenantAccessException
- If there is an issue while accessing the Tenant
.Copyright © 2018 SAP SE. All rights reserved.