OAuthCreatingTicketContext Class¶
Contains information about the login session as well as the user System.Security.Claims.ClaimsIdentity
.
- Namespace
Microsoft.AspNetCore.Authentication.OAuth
- Assemblies
- Microsoft.AspNetCore.Authentication.OAuth
Syntax¶
public class OAuthCreatingTicketContext : BaseContext
-
class
Microsoft.AspNetCore.Authentication.OAuth.
OAuthCreatingTicketContext
Constructors¶
-
OAuthCreatingTicketContext
(Microsoft.AspNetCore.Authentication.AuthenticationTicket, Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Builder.OAuthOptions, System.Net.Http.HttpClient, Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse)¶ Initializes a new
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext
.Arguments: - ticket (Microsoft.AspNetCore.Authentication.AuthenticationTicket) – The
Microsoft.AspNetCore.Authentication.AuthenticationTicket
. - context (Microsoft.AspNetCore.Http.HttpContext) – The HTTP environment.
- options (Microsoft.AspNetCore.Builder.OAuthOptions) – The options used by the authentication middleware.
- backchannel (System.Net.Http.HttpClient) – The HTTP client used by the authentication middleware
- tokens (Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse) – The tokens returned from the token endpoint.
public OAuthCreatingTicketContext(AuthenticationTicket ticket, HttpContext context, OAuthOptions options, HttpClient backchannel, OAuthTokenResponse tokens)
- ticket (Microsoft.AspNetCore.Authentication.AuthenticationTicket) – The
-
OAuthCreatingTicketContext
(Microsoft.AspNetCore.Authentication.AuthenticationTicket, Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Builder.OAuthOptions, System.Net.Http.HttpClient, Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse, Newtonsoft.Json.Linq.JObject) Initializes a new
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext
.Arguments: - ticket (Microsoft.AspNetCore.Authentication.AuthenticationTicket) – The
Microsoft.AspNetCore.Authentication.AuthenticationTicket
. - context (Microsoft.AspNetCore.Http.HttpContext) – The HTTP environment.
- options (Microsoft.AspNetCore.Builder.OAuthOptions) – The options used by the authentication middleware.
- backchannel (System.Net.Http.HttpClient) – The HTTP client used by the authentication middleware
- tokens (Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse) – The tokens returned from the token endpoint.
- user (Newtonsoft.Json.Linq.JObject) – The JSON-serialized user.
public OAuthCreatingTicketContext(AuthenticationTicket ticket, HttpContext context, OAuthOptions options, HttpClient backchannel, OAuthTokenResponse tokens, JObject user)
- ticket (Microsoft.AspNetCore.Authentication.AuthenticationTicket) – The
-
Properties¶
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
AccessToken
¶ Gets the access token provided by the authentication service.
Return type: System.String public string AccessToken { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
Backchannel
¶ Gets the backchannel used to communicate with the provider.
Return type: System.Net.Http.HttpClient public HttpClient Backchannel { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
ExpiresIn
¶ Gets the access token expiration time.
Return type: System.Nullable<System.TimeSpan> public TimeSpan? ExpiresIn { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
Identity
¶ Gets the main identity exposed by
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.Ticket
. This property returns <code>null</code> whenMicrosoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.Ticket
is <code>null</code>.Return type: System.Security.Claims.ClaimsIdentity public ClaimsIdentity Identity { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
Options
¶ Return type: Microsoft.AspNetCore.Builder.OAuthOptions public OAuthOptions Options { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
RefreshToken
¶ Gets the refresh token provided by the authentication service.
Return type: System.String public string RefreshToken { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
Ticket
¶ The
Microsoft.AspNetCore.Authentication.AuthenticationTicket
that will be created.Return type: Microsoft.AspNetCore.Authentication.AuthenticationTicket public AuthenticationTicket Ticket { get; set; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
TokenResponse
¶ Gets the token response returned by the authentication service.
Return type: Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse public OAuthTokenResponse TokenResponse { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
TokenType
¶ Gets the access token type provided by the authentication service.
Return type: System.String public string TokenType { get; }
-
Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext.
User
¶ Gets the JSON-serialized user or an empty
Newtonsoft.Json.Linq.JObject
if it is not available.Return type: Newtonsoft.Json.Linq.JObject public JObject User { get; }
-