Interface SecurityContextFactory

All Known Implementing Classes:
DefaultSecurityContextFactory

public interface SecurityContextFactory
A SecurityContextFactory returns a SecurityContext instance that retains a client connection's Subject instance.

It should be noted that at the time a SecurityContextFactory is invoked, a Subject is already associated with the client connection. A SecurityContextFactory is merely responsible for creating a Shiro-specific SecurityContext instance.

The returned SecurityContext instance will then be made available to any downstream Broker Filters via connectionContext.getSecurityContext() to ensure it may be used for Shiro-based security checks.

Since:
5.10.0
See Also:
  • Method Details

    • createSecurityContext

      SecurityContext createSecurityContext(SubjectConnectionReference ref)
      Creates a new SecurityContext retaining the client connection's Subject instance.

      It should be noted that at the time a SecurityContextFactory is invoked, a Subject is already associated with the client connection. A SecurityContextFactory is merely responsible for creating a Shiro-specific SecurityContext instance.

      The returned SecurityContext instance will then be made available to any downstream Broker Filters via connectionContext.getSecurityContext() to ensure it may be used for Shiro-based security checks.

      Parameters:
      ref - the client's connection and subject
      Returns:
      a new SecurityContext retaining the client connection's Subject instance.
      See Also: