Skip to content

Commit

Permalink
OF-256 Implemented support of auth with playfab
Browse files Browse the repository at this point in the history
  • Loading branch information
tsviatkov committed Oct 24, 2023
1 parent a2b119d commit 3c09b7e
Show file tree
Hide file tree
Showing 16 changed files with 1,373 additions and 80 deletions.
452 changes: 420 additions & 32 deletions Openfort.SDK/Generated/Api/OAuthApi.cs

Large diffs are not rendered by default.

52 changes: 14 additions & 38 deletions Openfort.SDK/Generated/Model/AccelbyteOauthConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace Openfort.SDK.Model
/// <summary>
/// Accelbyte oauth configuration
/// </summary>
[DataContract(Name = "AccelbyteOauthConfig")]
public partial class AccelbyteOauthConfig : IEquatable<AccelbyteOauthConfig>, IValidatableObject
[DataContract(Name = "AccelbyteOAuthConfig")]
public partial class AccelbyteOAuthConfig : IEquatable<AccelbyteOAuthConfig>, IValidatableObject
{

/// <summary>
Expand All @@ -40,44 +40,37 @@ public partial class AccelbyteOauthConfig : IEquatable<AccelbyteOauthConfig>, IV
[DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = true)]
public OAuthProviderACCELBYTE Provider { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="AccelbyteOauthConfig" /> class.
/// Initializes a new instance of the <see cref="AccelbyteOAuthConfig" /> class.
/// </summary>
[JsonConstructorAttribute]
protected AccelbyteOauthConfig() { }
protected AccelbyteOAuthConfig() { }
/// <summary>
/// Initializes a new instance of the <see cref="AccelbyteOauthConfig" /> class.
/// Initializes a new instance of the <see cref="AccelbyteOAuthConfig" /> class.
/// </summary>
/// <param name="baseUrl">Base URI of your accelbyte gaming service environment. E.g. https://mygame.dev.gamingservices.accelbyte.io/ (required).</param>
/// <param name="clientId">Client ID of your accelbyte gaming service environment. (required).</param>
/// <param name="clientSecret">Secret of your confidential IAM client. (required).</param>
/// <param name="_namespace">Namespace of the configuration in accelbyte gaming service (required).</param>
/// <param name="provider">provider (required).</param>
public AccelbyteOauthConfig(string baseUrl = default(string), string clientId = default(string), string clientSecret = default(string), string _namespace = default(string), OAuthProviderACCELBYTE provider = default(OAuthProviderACCELBYTE))
public AccelbyteOAuthConfig(string baseUrl = default(string), string clientId = default(string), string clientSecret = default(string), OAuthProviderACCELBYTE provider = default(OAuthProviderACCELBYTE))
{
// to ensure "baseUrl" is required (not null)
if (baseUrl == null)
{
throw new ArgumentNullException("baseUrl is a required property for AccelbyteOauthConfig and cannot be null");
throw new ArgumentNullException("baseUrl is a required property for AccelbyteOAuthConfig and cannot be null");
}
this.BaseUrl = baseUrl;
// to ensure "clientId" is required (not null)
if (clientId == null)
{
throw new ArgumentNullException("clientId is a required property for AccelbyteOauthConfig and cannot be null");
throw new ArgumentNullException("clientId is a required property for AccelbyteOAuthConfig and cannot be null");
}
this.ClientId = clientId;
// to ensure "clientSecret" is required (not null)
if (clientSecret == null)
{
throw new ArgumentNullException("clientSecret is a required property for AccelbyteOauthConfig and cannot be null");
throw new ArgumentNullException("clientSecret is a required property for AccelbyteOAuthConfig and cannot be null");
}
this.ClientSecret = clientSecret;
// to ensure "_namespace" is required (not null)
if (_namespace == null)
{
throw new ArgumentNullException("_namespace is a required property for AccelbyteOauthConfig and cannot be null");
}
this.Namespace = _namespace;
this.Provider = provider;
}

Expand All @@ -102,25 +95,17 @@ protected AccelbyteOauthConfig() { }
[DataMember(Name = "clientSecret", IsRequired = true, EmitDefaultValue = true)]
public string ClientSecret { get; set; }

/// <summary>
/// Namespace of the configuration in accelbyte gaming service
/// </summary>
/// <value>Namespace of the configuration in accelbyte gaming service</value>
[DataMember(Name = "namespace", IsRequired = true, EmitDefaultValue = true)]
public string Namespace { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AccelbyteOauthConfig {\n");
sb.Append("class AccelbyteOAuthConfig {\n");
sb.Append(" BaseUrl: ").Append(BaseUrl).Append("\n");
sb.Append(" ClientId: ").Append(ClientId).Append("\n");
sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n");
sb.Append(" Namespace: ").Append(Namespace).Append("\n");
sb.Append(" Provider: ").Append(Provider).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand All @@ -142,15 +127,15 @@ public virtual string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as AccelbyteOauthConfig);
return this.Equals(input as AccelbyteOAuthConfig);
}

/// <summary>
/// Returns true if AccelbyteOauthConfig instances are equal
/// Returns true if AccelbyteOAuthConfig instances are equal
/// </summary>
/// <param name="input">Instance of AccelbyteOauthConfig to be compared</param>
/// <param name="input">Instance of AccelbyteOAuthConfig to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AccelbyteOauthConfig input)
public bool Equals(AccelbyteOAuthConfig input)
{
if (input == null)
{
Expand All @@ -172,11 +157,6 @@ public bool Equals(AccelbyteOauthConfig input)
(this.ClientSecret != null &&
this.ClientSecret.Equals(input.ClientSecret))
) &&
(
this.Namespace == input.Namespace ||
(this.Namespace != null &&
this.Namespace.Equals(input.Namespace))
) &&
(
this.Provider == input.Provider ||
this.Provider.Equals(input.Provider)
Expand Down Expand Up @@ -204,10 +184,6 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.ClientSecret.GetHashCode();
}
if (this.Namespace != null)
{
hashCode = (hashCode * 59) + this.Namespace.GetHashCode();
}
hashCode = (hashCode * 59) + this.Provider.GetHashCode();
return hashCode;
}
Expand Down
141 changes: 141 additions & 0 deletions Openfort.SDK/Generated/Model/AuthenticatedPlayerResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/*
* Openfort API
*
* Complete Openfort API references and guides can be found at: https://openfort.xyz/docs
*
* The version of the OpenAPI document: 1.0.0
* Contact: founders@openfort.xyz
* Generated by: https://github.com/openapitools/openapi-generator.git
*/


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using FileParameter = Openfort.SDK.Client.FileParameter;
using OpenAPIDateConverter = Openfort.SDK.Client.OpenAPIDateConverter;

namespace Openfort.SDK.Model
{
/// <summary>
/// AuthenticatedPlayerResponse
/// </summary>
[DataContract(Name = "AuthenticatedPlayerResponse")]
public partial class AuthenticatedPlayerResponse : IEquatable<AuthenticatedPlayerResponse>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticatedPlayerResponse" /> class.
/// </summary>
[JsonConstructorAttribute]
protected AuthenticatedPlayerResponse() { }
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticatedPlayerResponse" /> class.
/// </summary>
/// <param name="playerId">Player&#39;s identifier. (required).</param>
public AuthenticatedPlayerResponse(string playerId = default(string))
{
// to ensure "playerId" is required (not null)
if (playerId == null)
{
throw new ArgumentNullException("playerId is a required property for AuthenticatedPlayerResponse and cannot be null");
}
this.PlayerId = playerId;
}

/// <summary>
/// Player&#39;s identifier.
/// </summary>
/// <value>Player&#39;s identifier.</value>
[DataMember(Name = "playerId", IsRequired = true, EmitDefaultValue = true)]
public string PlayerId { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AuthenticatedPlayerResponse {\n");
sb.Append(" PlayerId: ").Append(PlayerId).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as AuthenticatedPlayerResponse);
}

/// <summary>
/// Returns true if AuthenticatedPlayerResponse instances are equal
/// </summary>
/// <param name="input">Instance of AuthenticatedPlayerResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AuthenticatedPlayerResponse input)
{
if (input == null)
{
return false;
}
return
(
this.PlayerId == input.PlayerId ||
(this.PlayerId != null &&
this.PlayerId.Equals(input.PlayerId))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.PlayerId != null)
{
hashCode = (hashCode * 59) + this.PlayerId.GetHashCode();
}
return hashCode;
}
}

/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}

}
Loading

0 comments on commit 3c09b7e

Please sign in to comment.