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 Microsoft.​AspNetCore.​Authentication.​TicketSerializer

Assembly: Microsoft.AspNetCore.Authentication

Inheritance: object → TicketSerializer

Implemented Interfaces

Serializes and deserializes <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationTicket" /> instances.

Properties

public static TicketSerializer
Default
Gets the default implementation for <see cref="T:Microsoft.AspNetCore.Authentication.TicketSerializer" /> .

Methods

public byte[]
Serialize​(AuthenticationTicket ticket)
Deserialize​(byte[] data)
public void
Write​(System.​IO.​BinaryWriter writer, AuthenticationTicket ticket)
Writes the <paramref name="ticket" /> using the specified <paramref name="writer" /> .
writer The <see cref="T:System.IO.BinaryWriter" /> .
ticket The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationTicket" /> .
protected void
WriteIdentity​(System.​IO.​BinaryWriter writer, System.​Security.​Claims.​ClaimsIdentity identity)
Writes the specified <paramref name="identity" /> .
writer The <see cref="T:System.IO.BinaryWriter" /> .
identity The <see cref="T:System.Security.Claims.ClaimsIdentity" /> .
protected void
WriteClaim​(System.​IO.​BinaryWriter writer, System.​Security.​Claims.​Claim claim)
Read​(System.​IO.​BinaryReader reader)
Reads an <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationTicket" /> .
Returns The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationTicket" /> if the format is supported, otherwise <see langword="null" /> .
reader The <see cref="T:System.IO.BinaryReader" /> .
ReadIdentity​(System.​IO.​BinaryReader reader)
Reads a <see cref="T:System.Security.Claims.ClaimsIdentity" /> from a <see cref="T:System.IO.BinaryReader" /> .
Returns The read <see cref="T:System.Security.Claims.ClaimsIdentity" /> .
reader The <see cref="T:System.IO.BinaryReader" /> .
ReadClaim​(System.​IO.​BinaryReader reader, System.​Security.​Claims.​ClaimsIdentity identity)
Reads a <see cref="T:System.Security.Claims.Claim" /> and adds it to the specified <paramref name="identity" /> .
Returns The read <see cref="T:System.Security.Claims.Claim" /> .
reader The <see cref="T:System.IO.BinaryReader" /> .
identity The <see cref="T:System.Security.Claims.ClaimsIdentity" /> to add the claim to.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object