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:
public OAuthCreatingTicketContext(AuthenticationTicket ticket, HttpContext context, OAuthOptions options, HttpClient backchannel, OAuthTokenResponse tokens)
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:
public OAuthCreatingTicketContext(AuthenticationTicket ticket, HttpContext context, OAuthOptions options, HttpClient backchannel, OAuthTokenResponse tokens, JObject user)

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> when Microsoft.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; }