Class BasicAuthHttpServiceFilter<UserInfo>
- Type Parameters:
UserInfo- a type for authenticated user info object
- All Implemented Interfaces:
HttpExecutionStrategyInfluencer,StreamingHttpServiceFilterFactory,ExecutionStrategyInfluencer<HttpExecutionStrategy>
StreamingHttpServiceFilter, which filters HTTP requests using
RFC7617: The 'Basic' HTTP Authentication Scheme.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder for anStreamingHttpServiceFilter, which filters HTTP requests using RFC7617: The 'Basic' HTTP Authentication Scheme.static interfaceVerifiesuser-idandpassword, parsed from the 'Basic' HTTP Authentication Scheme credentials. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextMap.Key<Boolean>AContextMap.Keywhose presence with the valueBoolean.TRUEindicates that the current request was successfully authenticated by aBasicAuthHttpServiceFilter. -
Method Summary
Modifier and TypeMethodDescriptioncreate(StreamingHttpService service) Create aStreamingHttpServiceFilterusing the providedStreamingHttpService.Return anExecutionStrategythat describes the offloads required by the influencer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.servicetalk.http.api.HttpExecutionStrategyInfluencer
influenceStrategy
-
Field Details
-
AUTHENTICATED
AContextMap.Keywhose presence with the valueBoolean.TRUEindicates that the current request was successfully authenticated by aBasicAuthHttpServiceFilter.Stored in
AsyncContexton every successful authentication, regardless of whether auserInfokey was configured. Downstream components (for example the ServiceTalk JerseyBasicAuthSecurityContextFilters) use it to tell an authenticated request that published no user info apart from one that never went through Basic authentication.
-
-
Method Details
-
create
Description copied from interface:StreamingHttpServiceFilterFactoryCreate aStreamingHttpServiceFilterusing the providedStreamingHttpService.- Specified by:
createin interfaceStreamingHttpServiceFilterFactory- Parameters:
service-StreamingHttpServiceto filter- Returns:
StreamingHttpServiceFilterusing the providedStreamingHttpService.
-
requiredOffloads
Description copied from interface:HttpExecutionStrategyInfluencerReturn anExecutionStrategythat describes the offloads required by the influencer.The provided default implementation requests offloading of all operations. Implementations that require no offloading should be careful to return
HttpExecutionStrategies.offloadNone()rather thanHttpExecutionStrategies.offloadNever(). Implementations should avoid returningHttpExecutionStrategies.defaultStrategy(), instead returning the strategy they require orHttpExecutionStrategies.offloadAll()if offloading for all paths is required (safe default).- Specified by:
requiredOffloadsin interfaceExecutionStrategyInfluencer<UserInfo>- Specified by:
requiredOffloadsin interfaceHttpExecutionStrategyInfluencer- Returns:
- the
ExecutionStrategyrequired by the influencer.
-