.. java:import:: io.grpc Context .. java:import:: io.grpc Contexts .. java:import:: io.grpc ForwardingServerCall .. java:import:: io.grpc Metadata .. java:import:: io.grpc Metadata.Key .. java:import:: io.grpc ServerCall .. java:import:: io.grpc ServerCall.Listener .. java:import:: io.grpc ServerCallHandler .. java:import:: io.grpc ServerInterceptor .. java:import:: io.grpc Status .. java:import:: java.util Base64 .. java:import:: java.util.function Predicate .. java:import:: java.util.regex Pattern .. java:import:: org.apache.shiro SecurityUtils .. java:import:: org.apache.shiro.authc AuthenticationException .. java:import:: org.apache.shiro.subject Subject .. java:import:: org.apache.shiro.util ThreadContext .. java:import:: org.caosdb.server CaosDBServer .. java:import:: org.caosdb.server ServerProperties .. java:import:: org.caosdb.server.accessControl AnonymousAuthenticationToken .. java:import:: org.caosdb.server.accessControl AuthenticationUtils .. java:import:: org.caosdb.server.accessControl RealmUsernamePasswordToken .. java:import:: org.caosdb.server.accessControl SelfValidatingAuthenticationToken .. java:import:: org.caosdb.server.accessControl SessionToken .. java:import:: org.caosdb.server.accessControl UserSources .. java:import:: org.caosdb.server.utils Utils .. java:import:: org.restlet.data CookieSetting AuthInterceptor =============== .. java:package:: org.caosdb.server.grpc :noindex: .. java:type:: public class AuthInterceptor implements ServerInterceptor ServerInterceptor for Authentication. If the authentication succeeds or if the caller is anonymous, the \ :java:ref:`Context`\ of the \ :java:ref:`ServerCall`\ is updated with a \ :java:ref:`Subject`\ instance. If the request does not succeed the call is closed with \ :java:ref:`Status.UNAUTHENTICATED`\ . :author: Timm Fitschen Fields ------ AUTHENTICATION_HEADER ^^^^^^^^^^^^^^^^^^^^^ .. java:field:: public static final Key AUTHENTICATION_HEADER :outertype: AuthInterceptor AUTHORIZATION_HEADER ^^^^^^^^^^^^^^^^^^^^ .. java:field:: public static final Key AUTHORIZATION_HEADER :outertype: AuthInterceptor BASIC_SCHEME_PREFIX ^^^^^^^^^^^^^^^^^^^ .. java:field:: public static final String BASIC_SCHEME_PREFIX :outertype: AuthInterceptor COOKIE_HEADER ^^^^^^^^^^^^^ .. java:field:: public static final Key COOKIE_HEADER :outertype: AuthInterceptor PLEASE_LOG_IN ^^^^^^^^^^^^^ .. java:field:: public static final Status PLEASE_LOG_IN :outertype: AuthInterceptor SESSION_TOKEN_COOKIE_PREFIX_PATTERN ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:field:: public static final Pattern SESSION_TOKEN_COOKIE_PREFIX_PATTERN :outertype: AuthInterceptor SESSION_TOKEN_COOKIE_PREFIX_PREDICATE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:field:: public static final Predicate SESSION_TOKEN_COOKIE_PREFIX_PREDICATE :outertype: AuthInterceptor SUBJECT_KEY ^^^^^^^^^^^ .. java:field:: public static final Context.Key SUBJECT_KEY :outertype: AuthInterceptor Methods ------- bindSubject ^^^^^^^^^^^ .. java:method:: @SuppressWarnings public static Subject bindSubject() :outertype: AuthInterceptor expiredSessionMetadata ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final Metadata expiredSessionMetadata() :outertype: AuthInterceptor interceptCall ^^^^^^^^^^^^^ .. java:method:: @Override public Listener interceptCall(ServerCall call, Metadata headers, ServerCallHandler next) :outertype: AuthInterceptor