Class AuthHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    @Sharable
    public class AuthHandler
    extends Handler
    Adds servers-side support for OAuth 2 authorization flows for obtaining limited access to API functionality. The resource server is assumed to be the same server as the authentication server.

    Currently only one flow is supported:

    Resource Owner Password Credentials
    User credentials are directly exchanged for access tokens.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.yamcs.protobuf.AuthInfo createAuthInfo()  
      static SecurityStore getSecurityStore()  
      void handle​(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest req)  
      • Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

        acceptInboundMessage, channelRead
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Constructor Detail

      • AuthHandler

        public AuthHandler​(TokenStore tokenStore,
                           String contextPath)
    • Method Detail

      • handle

        public void handle​(io.netty.channel.ChannelHandlerContext ctx,
                           io.netty.handler.codec.http.FullHttpRequest req)
        Specified by:
        handle in class Handler
      • createAuthInfo

        public static org.yamcs.protobuf.AuthInfo createAuthInfo()
      • getSecurityStore

        public static SecurityStore getSecurityStore()