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
Nested ClassesModifier and TypeClassDescriptionstatic classData holder for passing anHttpRequestto a login call. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract AuthenticationInfogetAuthenticationInfo(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest request) Identify the subject based on the given information.abstract booleanhandles(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, waitMethods 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:AuthModuleIdentify the subject based on the given information.- Specified by:
getAuthenticationInfoin interfaceAuthModule- Returns:
- an info object containing the principal of the subject, or
nullif 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
-