Package com.alfresco.auth
Class AuthInterceptor
-
- All Implemented Interfaces:
-
okhttp3.Interceptor
public final class AuthInterceptor implements InterceptorOkHttp Interceptor which deals with managing session information and attaching authentication headers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAuthInterceptor.ListenerInterface definition for a callback to be invoked on authentication events.
-
Method Summary
Modifier and Type Method Description final UnitsetListener(AuthInterceptor.Listener listener)Associates event listener with current object. final Unitfinish()Call to cleanup any running tasks before the object is GCed to avoid any leaks. Responseintercept(Interceptor.Chain chain)final static StringbasicState(String username, String password)Returns compatible state representation for basic authorization final static Pair<String, String>decodeBasicState(String state)Returns a Pair from provided basic state Please try to avoid using this function if possible. -
-
Method Detail
-
setListener
final Unit setListener(AuthInterceptor.Listener listener)
Associates event listener with current object.
-
finish
final Unit finish()
Call to cleanup any running tasks before the object is GCed to avoid any leaks.
-
intercept
Response intercept(Interceptor.Chain chain)
-
basicState
final static String basicState(String username, String password)
Returns compatible state representation for basic authorization
-
decodeBasicState
final static Pair<String, String> decodeBasicState(String state)
-
-
-
-