Package io.quarkus.vertx.http.security
Interface HttpSecurity.Authorization
- Enclosing interface:
HttpSecurity
public static interface HttpSecurity.Authorization
Represents HTTP request authorization.
-
Method Summary
Modifier and TypeMethodDescriptiondeny()Access to HTTP requests will be denied.permissions(String... permissionNames) HTTP requests will only be accessible ifSecurityIdentityhas all the requiredStringPermissions.permissions(Permission... requiredPermissions) HTTP requests will only be accessible ifSecurityIdentityhas all the required permissions.permit()Access to HTTP requests will be permitted.policy(HttpSecurityPolicy policy) HTTP requests will only be accessible if the passedHttpSecurityPolicygrants access.policy(BiPredicate<io.quarkus.security.identity.SecurityIdentity, io.vertx.ext.web.RoutingContext> predicate) HTTP requests will only be accessible if the passed predicate returnstrue.HTTP requests will only be accessible if the passed predicate returnstrue.HTTP requests will only be accessible ifSecurityIdentityhas all the required roles.HTTP requests will only be accessible ifSecurityIdentityhas all the required roles.
-
Method Details
-
permit
HttpSecurity permit()Access to HTTP requests will be permitted. -
deny
HttpSecurity deny()Access to HTTP requests will be denied. -
roles
HTTP requests will only be accessible ifSecurityIdentityhas all the required roles. Roles must be literal, property expansion is not supported here.- Parameters:
roleToRoles- see the 'quarkus.http.auth.policy."role-policy".roles."role-name"' configuration propertyrolesAllowed- see the 'quarkus.http.auth.policy."role-policy".roles-allowed' configuration property- Returns:
- HttpSecurity
-
roles
HTTP requests will only be accessible ifSecurityIdentityhas all the required roles. Roles must be literal, property expansion is not supported here. -
permissions
HTTP requests will only be accessible ifSecurityIdentityhas all the required permissions. -
permissions
HTTP requests will only be accessible ifSecurityIdentityhas all the requiredStringPermissions.- Parameters:
permissionNames- requiredPermission.getName()
-
policy
HTTP requests will only be accessible if the passedHttpSecurityPolicygrants access. -
policy
HTTP requests will only be accessible if the passed predicate returnstrue. This is a shortcut method forpolicy(HttpSecurityPolicy). TheSecurityIdentityin this special case is never anonymous, anonymous requests will be denied. -
policy
HttpSecurity policy(BiPredicate<io.quarkus.security.identity.SecurityIdentity, io.vertx.ext.web.RoutingContext> predicate) HTTP requests will only be accessible if the passed predicate returnstrue. This is a shortcut method forpolicy(HttpSecurityPolicy).
-