Class AuthChallenge
- Namespace
- Trellis
- Assembly
- Trellis.Core.dll
Represents a single HTTP authentication challenge (RFC 9110 §11.6.1) carried by
Error.Unauthorized. Multiple challenges may be combined to round-trip
the full WWW-Authenticate header.
public sealed record AuthChallenge : IEquatable<AuthChallenge>
- Inheritance
-
AuthChallenge
- Implements
- Inherited Members
- Extension Methods
Constructors
AuthChallenge(string, ImmutableDictionary<string, string>?)
Represents a single HTTP authentication challenge (RFC 9110 §11.6.1) carried by
Error.Unauthorized. Multiple challenges may be combined to round-trip
the full WWW-Authenticate header.
public AuthChallenge(string Scheme, ImmutableDictionary<string, string>? Params = null)
Parameters
SchemestringThe auth scheme (e.g.
"Bearer","Basic").ParamsImmutableDictionary<string, string>Optional parameters for the challenge (e.g.
realm,scope,error). Compared by value contents; parameter order is not significant.
Properties
Params
Optional parameters for the challenge (e.g. realm, scope, error).
Compared by value contents; parameter order is not significant.
public ImmutableDictionary<string, string>? Params { get; init; }
Property Value
Scheme
The auth scheme (e.g. "Bearer", "Basic").
public string Scheme { get; init; }
Property Value
Methods
Equals(AuthChallenge?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(AuthChallenge? other)
Parameters
otherAuthChallengeAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.