Class RoleExtractor


  • public class RoleExtractor
    extends java.lang.Object
    Contains functions for request handling.
    Author:
    https://github.com/floriankammermann [Florian Kammermann]
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String groupHeader  
      static java.lang.String roleHeader  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> extractRoles​(io.vertx.core.http.HttpServerRequest request)
      Extract the roles from the request.
      java.util.Set<java.lang.String> extractRoles​(io.vertx.core.MultiMap headers)
      Extract the roles from the given http header
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RoleExtractor

        public RoleExtractor​(java.lang.String rolePattern)
      • RoleExtractor

        public RoleExtractor()
    • Method Detail

      • extractRoles

        public java.util.Set<java.lang.String> extractRoles​(io.vertx.core.http.HttpServerRequest request)
        Extract the roles from the request.
        Parameters:
        request - the request
        Returns:
        the role set or null if no role information was found.
      • extractRoles

        public java.util.Set<java.lang.String> extractRoles​(io.vertx.core.MultiMap headers)
        Extract the roles from the given http header
        Parameters:
        headers - the request/response headers to analyse
        Returns:
        the role set or null if no role information was found.