Module io.inverno.mod.security.http
Class BasicAuthenticationErrorInterceptor<A extends ExchangeContext,B extends ErrorExchange<A>>
java.lang.Object
io.inverno.mod.security.http.AuthenticationErrorInterceptor<A,B>
io.inverno.mod.security.http.HttpAuthenticationErrorInterceptor<A,B>
io.inverno.mod.security.http.basic.BasicAuthenticationErrorInterceptor<A,B>
- Type Parameters:
A- the context typeB- the error exchange type
- All Implemented Interfaces:
ExchangeInterceptor<A,B>
public class BasicAuthenticationErrorInterceptor<A extends ExchangeContext,B extends ErrorExchange<A>>
extends HttpAuthenticationErrorInterceptor<A,B>
An HTTP authentication error interceptor that implements RFC 7617 The 'Basic' HTTP Authentication Scheme.
As per RFC 7617, a basic challenge with the realm parameter is sent to the requester to initiate basic HTTP authentication.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from class io.inverno.mod.security.http.AuthenticationErrorInterceptor
terminal -
Constructor Summary
ConstructorsConstructorDescriptionCreates a basic authentication error interceptor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateChallenge(SecurityException cause) Creates the challenge to send to the requester.getRealm()Returns the realm.Methods inherited from class io.inverno.mod.security.http.HttpAuthenticationErrorInterceptor
interceptUnauthorizedMethods inherited from class io.inverno.mod.security.http.AuthenticationErrorInterceptor
interceptMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.http.server.ExchangeInterceptor
andThen, compose
-
Constructor Details
-
BasicAuthenticationErrorInterceptor
Creates a basic authentication error interceptor.
- Parameters:
realm- the realm
-
-
Method Details
-
getRealm
Returns the realm.
- Returns:
- the realm
-
createChallenge
Description copied from class:HttpAuthenticationErrorInterceptorCreates the challenge to send to the requester.
- Specified by:
createChallengein classHttpAuthenticationErrorInterceptor<A extends ExchangeContext,B extends ErrorExchange<A>> - Parameters:
cause- the cause of the error (can be null)- Returns:
- a challenge
-