// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Auth { /// /// A structure that contains login credentials. What is required is dependent on the type of login being initiated. /// /// This is part of the input structure and related to device auth. /// /// Use of the ID and Token fields differs based on the Type. They should be null, unless specified: /// - ID is the email address, and Token is the password. /// - Token is the exchange code. /// - If targeting console platforms, Token is the long lived refresh token. Otherwise N/A. /// - N/A. /// - ID is the host (e.g. localhost:6547), and Token is the credential name registered in the EOS Developer Authentication Tool. /// - Token is the refresh token. /// - SystemAuthCredentialsOptions may be required if targeting mobile platforms. Otherwise N/A. /// - Token is the external auth token specified by ExternalType. /// /// /// /// public struct IOSCredentials { /// /// ID of the user logging in, based on /// public Utf8String Id { get; set; } /// /// Credentials or token related to the user logging in /// public Utf8String Token { get; set; } /// /// Type of login. Needed to identify the auth method to use /// public LoginCredentialType Type { get; set; } /// /// This field is for system specific options, if any. /// /// If provided, the structure will be located in (System)/eos_(system).h. /// The structure will be named EOS_(System)_Auth_CredentialsOptions. /// public IOSCredentialsSystemAuthCredentialsOptions? SystemAuthCredentialsOptions { get; set; } /// /// Type of external login. Needed to identify the external auth method to use. /// Used when login type is set to , ignored for other methods. /// public ExternalCredentialType ExternalType { get; set; } internal void Set(ref IOSCredentialsInternal other) { Id = other.Id; Token = other.Token; Type = other.Type; SystemAuthCredentialsOptions = other.SystemAuthCredentialsOptions; ExternalType = other.ExternalType; } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)] internal struct IOSCredentialsInternal : IGettable, ISettable, System.IDisposable { private int m_ApiVersion; private System.IntPtr m_Id; private System.IntPtr m_Token; private LoginCredentialType m_Type; private System.IntPtr m_SystemAuthCredentialsOptions; private ExternalCredentialType m_ExternalType; public Utf8String Id { get { Utf8String value; Helper.Get(m_Id, out value); return value; } set { Helper.Set(value, ref m_Id); } } public Utf8String Token { get { Utf8String value; Helper.Get(m_Token, out value); return value; } set { Helper.Set(value, ref m_Token); } } public LoginCredentialType Type { get { return m_Type; } set { m_Type = value; } } public IOSCredentialsSystemAuthCredentialsOptions? SystemAuthCredentialsOptions { get { IOSCredentialsSystemAuthCredentialsOptions? value; Helper.Get(m_SystemAuthCredentialsOptions, out value); return value; } set { Helper.Set(ref value, ref m_SystemAuthCredentialsOptions); } } public ExternalCredentialType ExternalType { get { return m_ExternalType; } set { m_ExternalType = value; } } public void Set(ref IOSCredentials other) { m_ApiVersion = AuthInterface.CredentialsApiLatest; Id = other.Id; Token = other.Token; Type = other.Type; SystemAuthCredentialsOptions = other.SystemAuthCredentialsOptions; ExternalType = other.ExternalType; } public void Set(ref IOSCredentials? other) { if (other.HasValue) { m_ApiVersion = AuthInterface.CredentialsApiLatest; Id = other.Value.Id; Token = other.Value.Token; Type = other.Value.Type; SystemAuthCredentialsOptions = other.Value.SystemAuthCredentialsOptions; ExternalType = other.Value.ExternalType; } } public void Dispose() { Helper.Dispose(ref m_Id); Helper.Dispose(ref m_Token); Helper.Dispose(ref m_SystemAuthCredentialsOptions); } public void Get(out IOSCredentials output) { output = new IOSCredentials(); output.Set(ref this); } } }