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 typeB
- the identity typeC
- the access controller typeD
- the intercepting security context typeE
- the exchange type
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionstatic <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.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.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.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.Methods inherited from interface io.inverno.mod.http.server.ExchangeInterceptor
andThen, compose, intercept
-
Method Details
-
of
static <A extends Credentials,B extends Authentication, SecurityInterceptor<A,C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> C, ofD, E, F> (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 typeB
- the authentication typeC
- the identity typeD
- the access controller typeE
- the intercepting security context typeF
- the exchange type- Parameters:
credentialsExtractor
- a credentials extractorauthenticator
- an authenticator- Returns:
- a new security interceptor
-
of
static <A extends Credentials,B extends Authentication, SecurityInterceptor<A,C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> C, ofD, E, F> (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 typeB
- the authentication typeC
- the identity typeD
- the access controller typeE
- the intercepting security context typeF
- the exchange type- Parameters:
credentialsExtractor
- a credentials extractorauthenticator
- an authenticatoridentityResolver
- an identity resolver- Returns:
- a new security interceptor
-
of
static <A extends Credentials,B extends Authentication, SecurityInterceptor<A,C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> C, ofD, E, F> (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 typeB
- the authentication typeC
- the identity typeD
- the access controller typeE
- the intercepting security context typeF
- the exchange type- Parameters:
credentialsExtractor
- a credentials extractorauthenticator
- an authenticatoraccessControllerResolver
- an access controller resolver- Returns:
- a new security interceptor
-
of
static <A extends Credentials,B extends Authentication, SecurityInterceptor<A,C extends Identity, D extends AccessController, E extends InterceptingSecurityContext<C, D>, F extends Exchange<E>> C, ofD, E, F> (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 typeB
- the authentication typeC
- the identity typeD
- the access controller typeE
- the intercepting security context typeF
- the exchange type- Parameters:
credentialsExtractor
- a credentials extractorauthenticator
- an authenticatoridentityResolver
- an identity resolveraccessControllerResolver
- an access controller resolver- Returns:
- a new security interceptor
-