Class RestApiRequestAuthorizationHandler

java.lang.Object
org.wso2.carbon.registry.rest.api.handler.RestApiRequestAuthorizationHandler
All Implemented Interfaces:
org.apache.cxf.jaxrs.ext.RequestHandler

public class RestApiRequestAuthorizationHandler extends Object implements org.apache.cxf.jaxrs.ext.RequestHandler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.commons.logging.Log
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.ws.rs.core.Response
    handleRequest(org.apache.cxf.message.Message message, org.apache.cxf.jaxrs.model.ClassResourceInfo resourceInfo)
    This method handles the request received at the registry endpoint.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • log

      protected org.apache.commons.logging.Log log
  • Constructor Details

    • RestApiRequestAuthorizationHandler

      public RestApiRequestAuthorizationHandler()
  • Method Details

    • handleRequest

      public javax.ws.rs.core.Response handleRequest(org.apache.cxf.message.Message message, org.apache.cxf.jaxrs.model.ClassResourceInfo resourceInfo)
      This method handles the request received at the registry endpoint. The method decodes the extracted JWT token and extract the enduser's username and tenantID which is appended to the original rest request as query param and forwarded to the respective resource class. This method returns a null value which indicates that the request to be processed.
      Specified by:
      handleRequest in interface org.apache.cxf.jaxrs.ext.RequestHandler