Package io.servicetalk.http.utils.auth
Interface BasicAuthHttpServiceFilter.CredentialsVerifier<UserInfo>
- Type Parameters:
UserInfo
- a type for authenticated user info object
- All Superinterfaces:
AsyncCloseable
,BiFunction<String,
,String, Single<UserInfo>> ExecutionStrategyInfluencer<HttpExecutionStrategy>
- Enclosing class:
- BasicAuthHttpServiceFilter<UserInfo>
public static interface BasicAuthHttpServiceFilter.CredentialsVerifier<UserInfo>
extends BiFunction<String,String,Single<UserInfo>>, AsyncCloseable, ExecutionStrategyInfluencer<HttpExecutionStrategy>
Verifies
user-id
and password
, parsed from the 'Basic' HTTP Authentication Scheme credentials.
This is an AutoCloseable
BiFunction
, which accepts user-id
and password
pair and
returns Single
<BasicAuthHttpServiceFilter.CredentialsVerifier
> with a user info object of authenticated user. In case of denied
access Single
must fail with AuthenticationException
.
-
Method Summary
Modifier and TypeMethodDescriptionVerifiesuser-id
andpassword
, parsed from the 'Basic' HTTP Authentication Scheme credentials.default HttpExecutionStrategy
Return anExecutionStrategy
that describes the offloads required by the influencer.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
apply
Verifiesuser-id
andpassword
, parsed from the 'Basic' HTTP Authentication Scheme credentials.- Specified by:
apply
in interfaceBiFunction<String,
String, Single<UserInfo>> - Parameters:
userId
- auser-id
parsed from the authentication tokenpassword
- apassword
parsed from the authentication token- Returns:
Single
<BasicAuthHttpServiceFilter.CredentialsVerifier
> with a user info object of authenticated user orSingle
failed with anAuthenticationException
if access was denied
-
requiredOffloads
Description copied from interface:ExecutionStrategyInfluencer
Return anExecutionStrategy
that describes the offloads required by the influencer.- Specified by:
requiredOffloads
in interfaceExecutionStrategyInfluencer<UserInfo>
- Returns:
- the
ExecutionStrategy
required by the influencer.
-