Class AuthenticationDataTokenChannelInterceptor

java.lang.Object
org.springframework.messaging.support.ChannelInterceptorAdapter
net.solarnetwork.web.security.AuthenticationDataTokenChannelInterceptor
All Implemented Interfaces:
org.springframework.messaging.support.ChannelInterceptor

public class AuthenticationDataTokenChannelInterceptor extends org.springframework.messaging.support.ChannelInterceptorAdapter
Authentication filter for AuthenticationData style token authentication on a STOMP message channel.

This class depends on the RequestInfoHandshakeInterceptor to provide access to some data required for authentication.

Since:
1.14
Version:
1.1
Author:
matt
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthenticationDataTokenChannelInterceptor(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    preReceive(org.springframework.messaging.MessageChannel channel)
     
    org.springframework.messaging.Message<?>
    preSend(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel)
     
    void
    setMaxDateSkew(long maxDateSkew)
    Configure the maximum allowable date skew.

    Methods inherited from class org.springframework.messaging.support.ChannelInterceptorAdapter

    afterReceiveCompletion, afterSendCompletion, postReceive, postSend

    Methods inherited from class java.lang.Object

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

    • AuthenticationDataTokenChannelInterceptor

      public AuthenticationDataTokenChannelInterceptor(org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
      Constructor.
      Parameters:
      userDetailsService - the user details service to use
  • Method Details

    • setMaxDateSkew

      public void setMaxDateSkew(long maxDateSkew)
      Configure the maximum allowable date skew.
      Parameters:
      maxDateSkew - the maximum date skew, in milliseconds; defaults to 15 minutes
    • preSend

      public org.springframework.messaging.Message<?> preSend(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel)
      Specified by:
      preSend in interface org.springframework.messaging.support.ChannelInterceptor
      Overrides:
      preSend in class org.springframework.messaging.support.ChannelInterceptorAdapter
    • preReceive

      public boolean preReceive(org.springframework.messaging.MessageChannel channel)
      Specified by:
      preReceive in interface org.springframework.messaging.support.ChannelInterceptor
      Overrides:
      preReceive in class org.springframework.messaging.support.ChannelInterceptorAdapter