Class ProtoHttpAuthLifecycleHook
Resolves the ordered authenticator attributes that apply to a protocol before each test, builds a
composite authenticator when more than one applies, and records the resolved configuration as the
protocol's auth entity state. The client a test uses is chosen separately by [Application].
public abstract class ProtoHttpAuthLifecycleHook : IProtoTestHook
- Inheritance
-
ProtoHttpAuthLifecycleHook
- Implements
- Inherited Members
- Extension Methods
Constructors
ProtoHttpAuthLifecycleHook(string)
Resolves the ordered authenticator attributes that apply to a protocol before each test, builds a
composite authenticator when more than one applies, and records the resolved configuration as the
protocol's auth entity state. The client a test uses is chosen separately by [Application].
protected ProtoHttpAuthLifecycleHook(string protocolName)
Parameters
protocolNamestring
Properties
Order
Order of execution for the hook. Lower values are executed earlier in the lifecycle.
public int Order { get; }
Property Value
Methods
AfterTestAsync(ProtoExecutionContext)
Executed asynchronously after a test completes.
public Task AfterTestAsync(ProtoExecutionContext context)
Parameters
contextProtoExecutionContext
Returns
BeforeTestAsync(ProtoExecutionContext)
Executed asynchronously before a test starts.
public Task BeforeTestAsync(ProtoExecutionContext context)
Parameters
contextProtoExecutionContext
Returns
SetContext(ProtoExecutionContext, Func<ProtoExecutionContext, IProtoHttpAuthenticator>?)
Stores the resolved authenticator factory as protocol-specific context state.
protected abstract void SetContext(ProtoExecutionContext context, Func<ProtoExecutionContext, IProtoHttpAuthenticator>? authenticatorFactory)
Parameters
contextProtoExecutionContextauthenticatorFactoryFunc<ProtoExecutionContext, IProtoHttpAuthenticator>