Class HasPermissionFluigImpl
java.lang.Object
com.totvs.tjf.security.access.fluig.HasPermissionFluigImpl
- All Implemented Interfaces:
HasPermission
Creates
RestTemplate
for verify permissions on Authorization Service.- Author:
- Marcos Paulo dos Santos
- See Also:
-
RestTemplate
FeaturePermissionEvaluator
-
Constructor Summary
ConstructorsConstructorDescriptionHasPermissionFluigImpl
(SecurityAccessApiProperties properties, String applicationName, org.springframework.security.oauth2.jwt.JwtDecoder decoder, com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isPermitted
(String token, String feature) Verify on Authorization Service if user has permission for a feature.
-
Constructor Details
-
HasPermissionFluigImpl
public HasPermissionFluigImpl(SecurityAccessApiProperties properties, String applicationName, org.springframework.security.oauth2.jwt.JwtDecoder decoder, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
isPermitted
Verify on Authorization Service if user has permission for a feature.- Specified by:
isPermitted
in interfaceHasPermission
- Parameters:
token
- value of the Authorization header Bearer token.feature
- value of the feature that will be verified in the authorization service.- Returns:
- true if the permission is granted in permissions URI, false otherwise.
-