AuthInterceptor

public class AuthInterceptor implements ServerInterceptor

ServerInterceptor for Authentication. If the authentication succeeds or if the caller is anonymous, the Context of the ServerCall is updated with a Subject instance. If the request does not succeed the call is closed with Status.UNAUTHENTICATED.

Author:

Timm Fitschen

Fields

AUTHENTICATION_HEADER

public static final Key<String> AUTHENTICATION_HEADER

AUTHORIZATION_HEADER

public static final Key<String> AUTHORIZATION_HEADER

BASIC_SCHEME_PREFIX

public static final String BASIC_SCHEME_PREFIX

PLEASE_LOG_IN

public static final Status PLEASE_LOG_IN

SUBJECT_KEY

public static final Context.Key<Subject> SUBJECT_KEY

Methods

bindSubject

public static Subject bindSubject()

expiredSessionMetadata

public final Metadata expiredSessionMetadata()

interceptCall

public <ReqT, RespT> Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next)