Class LocalScopePrefixExtractor
java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.principal.LocalScopePrefixExtractor
Deprecated.
To be removed without replacement. Please refer to release notes for more information.
This class contains the logic to extract the values of the
scope claim of a JWT and returns it as a
Set of Authorizations.-
Constructor Summary
ConstructorsConstructorDescriptionLocalScopePrefixExtractor(LocalScopePrefixProvider localScopePrefixProvider) Deprecated.Creates a new instance with the givenLocalScopePrefixProviderwhich provides the prefix of the scopes to be used. -
Method Summary
Modifier and TypeMethodDescriptionio.vavr.control.Try<Set<Authorization>>getAuthorizations(com.auth0.jwt.interfaces.Payload jwt) Deprecated.Extracts the authorizations from the given JWT.
-
Constructor Details
-
LocalScopePrefixExtractor
Deprecated.Creates a new instance with the givenLocalScopePrefixProviderwhich provides the prefix of the scopes to be used.- Parameters:
localScopePrefixProvider- The provider for the prefix of relevant scopes.
-
-
Method Details
-
getAuthorizations
@Nonnull public io.vavr.control.Try<Set<Authorization>> getAuthorizations(@Nonnull com.auth0.jwt.interfaces.Payload jwt) Deprecated.Extracts the authorizations from the given JWT.For that the method takes all scope entries, removes all without the prefix given in the constructor and removes the prefix afterwards.
- Parameters:
jwt- The JWT to extract the scopes from- Returns:
- A
Trywith a set of all scopes asAuthorizationobjects.
-