Interface HttpSecurity.Authorization

Enclosing interface:
HttpSecurity

public static interface HttpSecurity.Authorization
Represents HTTP request authorization.
  • Method Details

    • permit

      HttpSecurity permit()
      Access to HTTP requests will be permitted.
    • deny

      HttpSecurity deny()
      Access to HTTP requests will be denied.
    • roles

      HttpSecurity roles(Map<String,List<String>> roleToRoles, String... rolesAllowed)
      HTTP requests will only be accessible if SecurityIdentity has 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 property
      rolesAllowed - see the 'quarkus.http.auth.policy."role-policy".roles-allowed' configuration property
      Returns:
      HttpSecurity
    • roles

      HttpSecurity roles(String... roles)
      HTTP requests will only be accessible if SecurityIdentity has all the required roles. Roles must be literal, property expansion is not supported here.
    • permissions

      HttpSecurity permissions(Permission... requiredPermissions)
      HTTP requests will only be accessible if SecurityIdentity has all the required permissions.
    • permissions

      HttpSecurity permissions(String... permissionNames)
      HTTP requests will only be accessible if SecurityIdentity has all the required StringPermissions.
      Parameters:
      permissionNames - required Permission.getName()
    • policy

      HTTP requests will only be accessible if the passed HttpSecurityPolicy grants access.
    • policy

      HttpSecurity policy(Predicate<io.quarkus.security.identity.SecurityIdentity> predicate)
      HTTP requests will only be accessible if the passed predicate returns true. This is a shortcut method for policy(HttpSecurityPolicy). The SecurityIdentity in 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 returns true. This is a shortcut method for policy(HttpSecurityPolicy).