Package com.sap.cloud.security.config
Interface OAuth2ServiceConfiguration
-
public interface OAuth2ServiceConfigurationProvides information of the identityService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default URIgetCertUrl()Cert URL of the OAuth2 identity service instance.StringgetClientId()Client id of identity service instance.default ClientIdentitygetClientIdentity()Client Identity of xsuaa instanceStringgetClientSecret()Client secret of identity service instance.default CredentialTypegetCredentialType()Credential type as defined in "oauth2-configuration" of the xsuaa service instance security descriptor.default List<String>getDomains()Domains of the OAuth2 identity service instance.Map<String,String>getProperties()Returns all properties of the configuration as a map.StringgetProperty(String name)Returns the value of the given property as string.ServicegetService()Returns the identityServiceof this configuration.URIgetUrl()Base URL of the OAuth2 identity service instance.booleanhasProperty(String name)Returns true if the configuration contains the given property.booleanisLegacyMode()Returns true, in case of XSUAA service runs in legacy mode.
-
-
-
Method Detail
-
getClientId
String getClientId()
Client id of identity service instance.- Returns:
- client identifier
-
getClientSecret
String getClientSecret()
Client secret of identity service instance.- Returns:
- client secret
-
getClientIdentity
default ClientIdentity getClientIdentity()
Client Identity of xsuaa instance- Returns:
- ClientIdentity object
-
getCredentialType
@Nullable default CredentialType getCredentialType()
Credential type as defined in "oauth2-configuration" of the xsuaa service instance security descriptor.- Returns:
- value of credential-type field
-
getUrl
URI getUrl()
Base URL of the OAuth2 identity service instance. In multi tenancy scenarios this is the url where the service instance was created.- Returns:
- base url, e.g. https://paastenant.idservice.com
-
getCertUrl
@Nullable default URI getCertUrl()
Cert URL of the OAuth2 identity service instance.- Returns:
- cert url, e.g. https://paastenant.cert.idservice.com
-
getDomains
default List<String> getDomains()
Domains of the OAuth2 identity service instance.- Returns:
- list of domain, e.g."idservice.com".
-
getProperty
@Nullable String getProperty(String name)
Returns the value of the given property as string.- Parameters:
name- the name of the property. You can find constants inCFConstants- Returns:
- the string value of the given property or null if the property does not exist.
-
getProperties
Map<String,String> getProperties()
Returns all properties of the configuration as a map.- Returns:
- all properties as map.
-
hasProperty
boolean hasProperty(String name)
Returns true if the configuration contains the given property.- Parameters:
name- the name of the property. You can find constants inCFConstants- Returns:
- true if the property does not exist.
-
getService
Service getService()
Returns the identityServiceof this configuration.- Returns:
- the service.
-
isLegacyMode
boolean isLegacyMode()
Returns true, in case of XSUAA service runs in legacy mode.- Returns:
- true in case it runs in legacy mode.
-
-