Class CreateAuthCode

java.lang.Object
net.lightapi.portal.command.AbstractCommandHandler
net.lightapi.portal.oauth.command.handler.CreateAuthCode
All Implemented Interfaces:
com.networknt.rpc.HybridHandler

public class CreateAuthCode extends net.lightapi.portal.command.AbstractCommandHandler
Create am authorization code from oauth-kafka code service. A client credentials token is needed to access this endpoint and the userId is passed from the payload. When this request is called, there is no user token available, so only client credentials token is used to authorize the request. The userId is passed in the data section.
Author:
Steve Hu
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
     

    Fields inherited from class net.lightapi.portal.command.AbstractCommandHandler

    config, HOST_ID, INCORRECT_TOKEN_TYPE, SEND_MESSAGE_EXCEPTION, USER_ID

    Fields inherited from interface com.networknt.rpc.HybridHandler

    ERROR_NOT_DEFINED, REQUEST_SUCCESS, STATUS_VALIDATION_ERROR
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.slf4j.Logger
     
    protected com.networknt.monad.Result<Map<String,Object>>
     

    Methods inherited from class net.lightapi.portal.command.AbstractCommandHandler

    additionalAction, buildCloudEvent, customizeOutput, enrichInput, handle, validateInput

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.networknt.rpc.HybridHandler

    getStatus, getStatus, validate
  • Field Details

    • logger

      public static final org.slf4j.Logger logger
  • Constructor Details

    • CreateAuthCode

      public CreateAuthCode()
  • Method Details

    • getCloudEventType

      public String getCloudEventType()
      Specified by:
      getCloudEventType in class net.lightapi.portal.command.AbstractCommandHandler
    • getLogger

      public org.slf4j.Logger getLogger()
      Specified by:
      getLogger in class net.lightapi.portal.command.AbstractCommandHandler
    • validateTokenType

      protected com.networknt.monad.Result<Map<String,Object>> validateTokenType(String userId, Map<String,Object> map)
      Overrides:
      validateTokenType in class net.lightapi.portal.command.AbstractCommandHandler