src/Http.OAuth/Extensions/HttpResponseMessageExtensions.cs
/// <summary>
/// Get the first non null and empty value from <paramref name="message" /> WWW-Authenticate header.
/// </summary>
/// <param name="message">Response message.</param>
/// <returns>Header parameter if exists; otherwise <code>null</code>.</returns>
Get the first non null and empty value from  WWW-Authenticate header.
Get the first non null and empty value from WWW - Authenticate header .
public static string GetWwwAuthenticateHeader(this HttpResponseMessage message)
        {
            using (var enumerator = message.Headers.WwwAuthenticate.GetEnumerator())
            {
                do
                {
                    var header = enumerator.Current;
                    if (!string.IsNullOrEmpty(header?.Parameter))
                    {
                        return header.Parameter;
                    }
                } while (enumerator.MoveNext());
            }
            return null;
        }
public static string GetWwwAuthenticateHeader ( this HttpResponseMessage message ) { using ( var enumerator = message . Headers . WwwAuthenticate . GetEnumerator ( ) ) { do { var header = enumerator . Current ; if ( ! string . IsNullOrEmpty ( header ? . Parameter ) ) { return header . Parameter ; } } while ( enumerator . MoveNext ( ) ) ; } return null ; }
Get the first non null and empty value from  WWW-Authenticate header.
Get the first non null and empty value from WWW - Authenticate header .
Header parameter if exists; otherwise null
Header parameter if exists ; otherwise null
HttpResponseMessage
this
message
None