You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.1 KiB
96 lines
2.1 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.Auth
|
|
{
|
|
/// <summary>
|
|
/// A structure that contains an ID token.
|
|
/// These structures are created by <see cref="AuthInterface.CopyIdToken" /> and must be passed to <see cref="AuthInterface.Release" /> when finished.
|
|
/// </summary>
|
|
public class IdToken : ISettable
|
|
{
|
|
/// <summary>
|
|
/// The Epic Account ID described by the ID token.
|
|
/// Use <see cref="EpicAccountId.FromString" /> to populate this field when validating a received ID token.
|
|
/// </summary>
|
|
public EpicAccountId AccountId { get; set; }
|
|
|
|
/// <summary>
|
|
/// The ID token as a Json Web Token (JWT) string.
|
|
/// </summary>
|
|
public string JsonWebToken { get; set; }
|
|
|
|
internal void Set(IdTokenInternal? other)
|
|
{
|
|
if (other != null)
|
|
{
|
|
AccountId = other.Value.AccountId;
|
|
JsonWebToken = other.Value.JsonWebToken;
|
|
}
|
|
}
|
|
|
|
public void Set(object other)
|
|
{
|
|
Set(other as IdTokenInternal?);
|
|
}
|
|
}
|
|
|
|
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
|
|
internal struct IdTokenInternal : ISettable, System.IDisposable
|
|
{
|
|
private int m_ApiVersion;
|
|
private System.IntPtr m_AccountId;
|
|
private System.IntPtr m_JsonWebToken;
|
|
|
|
public EpicAccountId AccountId
|
|
{
|
|
get
|
|
{
|
|
EpicAccountId value;
|
|
Helper.TryMarshalGet(m_AccountId, out value);
|
|
return value;
|
|
}
|
|
|
|
set
|
|
{
|
|
Helper.TryMarshalSet(ref m_AccountId, value);
|
|
}
|
|
}
|
|
|
|
public string JsonWebToken
|
|
{
|
|
get
|
|
{
|
|
string value;
|
|
Helper.TryMarshalGet(m_JsonWebToken, out value);
|
|
return value;
|
|
}
|
|
|
|
set
|
|
{
|
|
Helper.TryMarshalSet(ref m_JsonWebToken, value);
|
|
}
|
|
}
|
|
|
|
public void Set(IdToken other)
|
|
{
|
|
if (other != null)
|
|
{
|
|
m_ApiVersion = AuthInterface.CopyidtokenApiLatest;
|
|
AccountId = other.AccountId;
|
|
JsonWebToken = other.JsonWebToken;
|
|
}
|
|
}
|
|
|
|
public void Set(object other)
|
|
{
|
|
Set(other as IdToken);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Helper.TryMarshalDispose(ref m_AccountId);
|
|
Helper.TryMarshalDispose(ref m_JsonWebToken);
|
|
}
|
|
}
|
|
}
|