/// <summary> /// Initializes a new instance of the <see cref="OrionFederationFilter"/> class. /// </summary> /// <param name="publicKey"> /// A system account public key. /// </param> /// <param name="secretKey"> /// A system account secret key. /// </param> /// <param name="isOptional"> /// The is optional. /// </param> /// <param name="applicationId"> /// The application id. /// </param> /// <param name="federationServer"> /// The federation server endpoint. /// </param> public OrionFederationFilter(string publicKey, string secretKey, bool isOptional, string applicationId, string federationServer) { this.federationServer = federationServer; this.applicationId = applicationId; this.isOptional = isOptional; this.secretKey = secretKey; this.publicKey = publicKey; this.federationMode = FederationMode.AuthOnly; }
/// <summary> /// Initializes a new instance of the <see cref="OrionFederationFilter"/> class. /// </summary> /// <param name="publicKey"> /// A system account public key. /// </param> /// <param name="secretKey"> /// A system account secret key. /// </param> /// <param name="isOptional"> /// The is optional. /// </param> /// <param name="applicationId"> /// The application id. /// </param> public OrionFederationFilter(string publicKey, string secretKey, bool isOptional, string applicationId) { this.federationServer = "https://orion.shanecraven.com/Federation"; this.applicationId = applicationId; this.isOptional = isOptional; this.secretKey = secretKey; this.publicKey = publicKey; this.federationMode = FederationMode.AuthOnly; }
/// <summary> /// Converts FederationMode enum to its string representation. /// </summary> /// <param name="mode"> /// The mode. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> private string ConvertModeToString(FederationMode mode) { switch (mode) { case FederationMode.AuthOnly: return("auth"); case FederationMode.RoamEnabled: return("roamEnabled"); case FederationMode.RoamOnly: return("roamOnly"); default: return("auth"); } }