Class HeaderAuthSessionConfigurator

java.lang.Object
javax.websocket.server.ServerEndpointConfig.Configurator
org.aktin.broker.websocket.HeaderAuthSessionConfigurator

public class HeaderAuthSessionConfigurator
extends javax.websocket.server.ServerEndpointConfig.Configurator
Websocket session configurator with authentication. Performs authentication during websocket handshake. If successfull, authenticated user Principal instance is stored in the websocket Session.getUserProperties() with the key AUTH_USER.
Author:
R.W.Majeed
  • Field Summary

    Fields
    Modifier and Type Field Description
    static String AUTH_USER
    Websocket session user properties key where the authenticated user Principal is stored.
  • Constructor Summary

    Constructors
    Constructor Description
    HeaderAuthSessionConfigurator​(HeaderAuthentication auth, AuthCache cache)  
  • Method Summary

    Modifier and Type Method Description
    void modifyHandshake​(javax.websocket.server.ServerEndpointConfig sec, javax.websocket.server.HandshakeRequest request, javax.websocket.HandshakeResponse response)  

    Methods inherited from class javax.websocket.server.ServerEndpointConfig.Configurator

    checkOrigin, getEndpointInstance, getNegotiatedExtensions, getNegotiatedSubprotocol

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • modifyHandshake

      public void modifyHandshake​(javax.websocket.server.ServerEndpointConfig sec, javax.websocket.server.HandshakeRequest request, javax.websocket.HandshakeResponse response)
      Overrides:
      modifyHandshake in class javax.websocket.server.ServerEndpointConfig.Configurator