Package com.styra.opa.springboot.input
Interface OPAInputSubjectCustomizer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
By defining a bean which implements this interface, clients could customize OPA
input.subject
.-
Method Summary
Modifier and TypeMethodDescriptioncustomize
(Authentication authentication, RequestAuthorizationContext requestAuthorizationContext, Map<String, Object> subject) Customizessubject
Map
.
-
Method Details
-
customize
Map<String,Object> customize(Authentication authentication, RequestAuthorizationContext requestAuthorizationContext, Map<String, Object> subject) Customizessubject
Map
.- Parameters:
subject
- contains:- "type": "java_authentication"
(configurable via
opa.request.subject.type
property) - "id":
Authentication.getPrincipal()
- "details":
Authentication.getDetails()
- "authorities":
Authentication.getAuthorities()
- "type": "java_authentication"
(configurable via
- Returns:
- should at least contains these keys:
-