src/Foundation/Net/Gimela.Net.Http/Authentication/AuthenticationProvider.cs
/// <summary>
/// Create a challenge header (WWW-authenticate)
/// </summary>
/// <param name="response">Response that the authentication header should be added to</param>
/// <param name="realm">Realm that the user should authenticate in</param>
/// <returns>WWW-Authenticate header.</returns>
/// <remarks>
/// <para>
/// Scheme can currently be <c>basic</c> or <c>digest</c>. Basic is not very safe, but easier to use.
/// Digest is quite safe.
/// </para><para>
/// </para>
/// </remarks>
/// <exception cref="NotSupportedException">Requested scheme is not supported.</exception>
Create a challenge header (WWW-authenticate)
Create a challenge header ( WWW - authenticate )
public void CreateChallenge(IResponse response, string realm)
    {
      foreach (var authenticator in _authenticators.Values)
      {
        var header = authenticator.CreateChallenge(realm);
        response.Add(header.Name, header);
      }
    }
public void CreateChallenge ( IResponse response , string realm ) { foreach ( var authenticator in _authenticators . Values ) { var header = authenticator . CreateChallenge ( realm ) ; response . Add ( header . Name , header ) ; } }
Create a challenge header (WWW-authenticate)
Create a challenge header ( WWW - authenticate )
None
Requested scheme is not supported.
Requested scheme is not supported .
response
IResponse
Response that the authentication header should be added to
Response that the authentication header should be added to
realm
string
Realm that the user should authenticate in
Realm that the user should authenticate in
remarks
Scheme can currently be basicdigest
Scheme can currently be basicdigest