public class CloudFoundrySecurityService extends Object
| Constructor and Description |
|---|
CloudFoundrySecurityService(org.springframework.cloud.common.security.core.support.OAuth2TokenUtilsService oauth2TokenUtilsService,
org.springframework.web.client.RestTemplate restTemplate,
String cloudControllerUrl,
String applicationId) |
| Modifier and Type | Method and Description |
|---|---|
AccessLevel |
getAccessLevel(String token,
String applicationId)
Return the access level that should be granted to the given token.
|
boolean |
isSpaceDeveloper()
Returns
true if the user (using the access-token from
OAuth2RestTemplate) has full AccessLevel.FULL for the provided
applicationId |
public boolean isSpaceDeveloper()
true if the user (using the access-token from
OAuth2RestTemplate) has full AccessLevel.FULL for the provided
applicationIdpublic AccessLevel getAccessLevel(String token, String applicationId) throws CloudFoundryAuthorizationException
token - the tokenapplicationId - the cloud foundry application IDCloudFoundryAuthorizationException - if the token is not authorizedCopyright © 2019 Pivotal Software, Inc.. All rights reserved.