Package org.yamcs.security
Class AbstractHttpRequestAuthModule
java.lang.Object
org.yamcs.security.AbstractHttpRequestAuthModule
- All Implemented Interfaces:
AuthModule
- Direct Known Subclasses:
ApiKeyAuthModule
,IPAddressAuthModule
,RemoteUserAuthModule
Base class for an
AuthModule
that identifies users based on an incoming HTTP request.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Data holder for passing anHttpRequest
to a login call. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract AuthenticationInfo
getAuthenticationInfo
(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest request) Identify the subject based on the given information.abstract boolean
handles
(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest request) Returns true if this AuthModule is capable of handling the given HTTP request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.yamcs.security.AuthModule
authenticationSucceeded, getAuthorizationInfo, getSpec, init, verifyValidity
-
Constructor Details
-
AbstractHttpRequestAuthModule
public AbstractHttpRequestAuthModule()
-
-
Method Details
-
handles
public abstract boolean handles(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest request) Returns true if this AuthModule is capable of handling the given HTTP request. -
getAuthenticationInfo
public AuthenticationInfo getAuthenticationInfo(AuthenticationToken token) throws AuthenticationException Description copied from interface:AuthModule
Identify the subject based on the given information.- Specified by:
getAuthenticationInfo
in interfaceAuthModule
- Returns:
- an info object containing the principal of the subject, or
null
if the login failed - Throws:
AuthenticationException
-
getAuthenticationInfo
public abstract AuthenticationInfo getAuthenticationInfo(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest request) throws AuthenticationException - Throws:
AuthenticationException
-