Skip to content

AuthorisationCodeResponse

Troy Willmot edited this page Oct 21, 2016 · 1 revision

Summary

Represents the response from an authorisation attempt via a user agent when using the OAuth2GrantTypes.AuthorizationCode flow where the user authorises the token grant via a 'user agent' such as a browser.

Properties

AuthorisationCode

The auth code returned from the server, if one was provided. This can be exchanged for the desired access token.

State

The 'state' value that was passed to the server when authorisation was requested. This is returned to the client so it can match responses, recover state etc.

ErrorResponse

The error message if authentication failed or an authorisatin code was not granted.

Methods

FromUrlQueryString

Creates a new AuthorisationCodeResponse instance from a URL query string containing. If you're using WebAuthenticationBroker or hosting your own browser control for the user to log in as, you can retrieve the query string after the brower arrives the RedirectUrl and parse it using this function.