Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Duende.​IdentityModel.​Client.​ProtocolResponse
Assembly: Duende.IdentityModel
Inheritance: object → ProtocolResponse
Implemented Interfaces
A protocol response
Properties
HttpResponse
Gets the HTTP response.
public
string
Raw
Gets the raw protocol response (if present).
Gets the protocol response as JSON (if present).
Exception
Gets the exception (if present).
public
bool
IsError
Gets a value indicating whether an error occurred.
public
ResponseErrorType
ErrorType
Gets the type of the error.
protected
string
ErrorMessage
Gets or sets an explicit error message.
HttpStatusCode
Gets the HTTP status code - or <c>0</c> when <see cref="P:Duende.IdentityModel.Client.ProtocolResponse.HttpResponse" /> is <see langword="null" /> .
public
string
HttpErrorReason
Gets the HTTP error reason - or <see langword="null" /> when <see cref="P:Duende.IdentityModel.Client.ProtocolResponse.HttpResponse" /> is <see langword="null" /> .
public
string
Error
Gets the error.
public
string
DPoPNonce
The returned DPoP nonce header.
Methods
public static
System.​Threading.​Tasks.​Task<​T>
FromHttpResponseAsync​(System.​Net.​Http.​HttpResponseMessage httpResponse,
object initializationData = null,
bool skipJsonParsing = false,
System.​Action?<​T> onResponseCreated = null)
Initializes a protocol response from an HTTP response
httpResponse
The HTTP response.
initializationData
The initialization data.
skipJsonParsing
Disables parsing of json
onResponseCreated
An action that is invoked after the response is created, allowing for additional processing of the response.
public static
T
FromException​(System.​Exception ex,
string errorMessage = null)
Initializes a protocol response from an exception
ex
The ex.
errorMessage
The error message.
InitializeAsync​(object initializationData = null)
Allows to initialize instance specific data.
initializationData
The initialization data.
public
string
TryGet​(string name)
Tries to get a specific value from the JSON response.
name
The name.
public
void
Dispose​()
Dispose.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object