Interface HttpSecurityPolicy
- All Known Implementing Classes:
AuthenticatedHttpSecurityPolicy,DenySecurityPolicy,PathMatchingHttpSecurityPolicy,PermitSecurityPolicy,RolesAllowedHttpSecurityPolicy
public interface HttpSecurityPolicy
An HTTP Security policy, that controls which requests are allowed to proceed.
CDI beans implementing this interface are invoked on every request unless they define
name().
The policy with name() can then be referenced in the application.properties path matching rules,
or from the AuthorizationPolicy.name() annotation attribute.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA context object that can be used to run blocking tasksstatic classThe results of a permission checkstatic class -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<HttpSecurityPolicy.CheckResult> checkPermission(io.vertx.ext.web.RoutingContext request, io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> identity, HttpSecurityPolicy.AuthorizationRequestContext requestContext) default Stringname()If HTTP Security policy name is not null, then this policy is only called in two cases: - winning path-matching policy references this name in the application.properties - invoked Jakarta REST endpoint references this name in theAuthorizationPolicy.name()annotation attribute
-
Method Details
-
checkPermission
io.smallrye.mutiny.Uni<HttpSecurityPolicy.CheckResult> checkPermission(io.vertx.ext.web.RoutingContext request, io.smallrye.mutiny.Uni<io.quarkus.security.identity.SecurityIdentity> identity, HttpSecurityPolicy.AuthorizationRequestContext requestContext) -
name
If HTTP Security policy name is not null, then this policy is only called in two cases: - winning path-matching policy references this name in the application.properties - invoked Jakarta REST endpoint references this name in theAuthorizationPolicy.name()annotation attributeWhen the name is null, this policy is considered global and is applied on every single request. More details and examples can be found in Quarkus documentation.
- Returns:
- policy name
-