Interface SecurityInterceptor<A extends Credentials,B extends Identity,C extends AccessController,D extends InterceptingSecurityContext<B,C>,E extends Exchange<D>>

Type Parameters:
A - the credentials type
B - the identity type
C - the access controller type
D - the intercepting security context type
E - the exchange type
All Superinterfaces:
ExchangeInterceptor<D,E>

public interface SecurityInterceptor<A extends Credentials,B extends Identity,C extends AccessController,D extends InterceptingSecurityContext<B,C>,E extends Exchange<D>> extends ExchangeInterceptor<D,E>

The security interceptor extracts the credentials send by a requester, authenticates them and creates the security context in the exchange.

This is the main security interceptor that must be used on protectected resources. It authenticates the request and creates the SecurityContext in the exchange which can later be used in a AccessControlInterceptor or directly in the exchange handler to control the access to the resource.

Just like a SecurityManager, it relies on an Authenticator to authenticate credentials extracted from the request by a CredentialsExtractor, an IdentityResolver to resolve the identity of the authenticated entity and an AccessControllerResolver to get the access controller for the authenticated entity in order to create the SecurityContext which is set into the context of the exchange.

Since:
1.5
Author:
Jeremy Kuhn
See Also:
  • Method Details

    • of

      static <A extends Credentials, B extends Authentication, C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> SecurityInterceptor<A,C,D,E,F> of(CredentialsExtractor<? extends A> credentialsExtractor, Authenticator<? super A,? extends B> authenticator)

      Creates a security interceptor with the specified credentials extractor and authenticator.

      Type Parameters:
      A - the credentials type
      B - the authentication type
      C - the identity type
      D - the access controller type
      E - the intercepting security context type
      F - the exchange type
      Parameters:
      credentialsExtractor - a credentials extractor
      authenticator - an authenticator
      Returns:
      a new security interceptor
    • of

      static <A extends Credentials, B extends Authentication, C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> SecurityInterceptor<A,C,D,E,F> of(CredentialsExtractor<? extends A> credentialsExtractor, Authenticator<? super A,? extends B> authenticator, IdentityResolver<? super B,? extends C> identityResolver)

      Creates a security interceptor with the specified credentials extractor, authenticator and identity resolver.

      Type Parameters:
      A - the credentials type
      B - the authentication type
      C - the identity type
      D - the access controller type
      E - the intercepting security context type
      F - the exchange type
      Parameters:
      credentialsExtractor - a credentials extractor
      authenticator - an authenticator
      identityResolver - an identity resolver
      Returns:
      a new security interceptor
    • of

      static <A extends Credentials, B extends Authentication, C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> SecurityInterceptor<A,C,D,E,F> of(CredentialsExtractor<? extends A> credentialsExtractor, Authenticator<? super A,? extends B> authenticator, AccessControllerResolver<? super B,? extends D> accessControllerResolver)

      Creates a security interceptor with the specified credentials extractor, authenticator and access controller resolver.

      Type Parameters:
      A - the credentials type
      B - the authentication type
      C - the identity type
      D - the access controller type
      E - the intercepting security context type
      F - the exchange type
      Parameters:
      credentialsExtractor - a credentials extractor
      authenticator - an authenticator
      accessControllerResolver - an access controller resolver
      Returns:
      a new security interceptor
    • of

      static <A extends Credentials, B extends Authentication, C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> SecurityInterceptor<A,C,D,E,F> of(CredentialsExtractor<? extends A> credentialsExtractor, Authenticator<? super A,? extends B> authenticator, IdentityResolver<? super B,? extends C> identityResolver, AccessControllerResolver<? super B,? extends D> accessControllerResolver)

      Creates a security interceptor with the specified credentials extractor, authenticator, identity resolver and access controller resolver.

      Type Parameters:
      A - the credentials type
      B - the authentication type
      C - the identity type
      D - the access controller type
      E - the intercepting security context type
      F - the exchange type
      Parameters:
      credentialsExtractor - a credentials extractor
      authenticator - an authenticator
      identityResolver - an identity resolver
      accessControllerResolver - an access controller resolver
      Returns:
      a new security interceptor