Class ScpCfPrincipalFacade

java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.principal.DefaultPrincipalFacade
com.sap.cloud.sdk.cloudplatform.security.principal.ScpCfPrincipalFacade
All Implemented Interfaces:
PrincipalFacade

@Deprecated public class ScpCfPrincipalFacade extends DefaultPrincipalFacade
Deprecated.
Please use DefaultPrincipalFacade instead.
Facade providing access to Principal information on SAP Business Technology Platform Cloud Foundry.
  • Constructor Details

    • ScpCfPrincipalFacade

      public ScpCfPrincipalFacade(@Nullable LocalScopePrefixProvider localScopePrefixProvider)
      Deprecated.
      Creates a new instance of this facade with the given prefix provider.
      Parameters:
      localScopePrefixProvider - The prefix provider to be used to remove prefixes from authorizations.
    • ScpCfPrincipalFacade

      public ScpCfPrincipalFacade()
      Deprecated.
      Default constructor with default strategies.
  • Method Details

    • setIdExtractorFunction

      public void setIdExtractorFunction(@Nonnull String grantType, @Nonnull io.vavr.CheckedFunction1<com.auth0.jwt.interfaces.DecodedJWT,String> principalIdExtractor)
      Deprecated.
      This allows to set/override the way the Principal.getPrincipalId() is obtained, given a grant_type in the AuthToken.
      Parameters:
      grantType - The grant type to use the extractor for.
      principalIdExtractor - The logic to obtain an id for the Principal from the AuthToken.
    • tryGetCurrentPrincipal

      @Nonnull public io.vavr.control.Try<Principal> tryGetCurrentPrincipal()
      Deprecated.
      Specified by:
      tryGetCurrentPrincipal in interface PrincipalFacade
      Overrides:
      tryGetCurrentPrincipal in class DefaultPrincipalFacade