Created
February 15, 2015 03:48
-
-
Save robertmclaws/3a2824e139dc9240732e to your computer and use it in GitHub Desktop.
Auth0 Rule Models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Runtime.Serialization; | |
using Newtonsoft.Json; | |
namespace AdvancedREI.Project.Areas.External.Models | |
{ | |
[DataContract] | |
public class Identity | |
{ | |
[JsonProperty("access_token")] | |
public string AccessToken { get; set; } | |
[JsonProperty("provider")] | |
public string Provider { get; set; } | |
[JsonProperty("user_id")] | |
public string UserId { get; set; } | |
[JsonProperty("connection")] | |
public string Connection { get; set; } | |
[JsonProperty("isSocial")] | |
public bool IsSocial { get; set; } | |
} | |
[DataContract] | |
public class Auth0User | |
{ | |
[JsonProperty("_id")] | |
public string Id { get; set; } | |
[JsonProperty("clientID")] | |
public string ClientId { get; set; } | |
[JsonProperty("email")] | |
public string Email { get; set; } | |
[JsonProperty("emails")] | |
public List<string> Emails { get; set; } | |
[JsonProperty("family_name")] | |
public string FamilyName { get; set; } | |
[JsonProperty("given_name")] | |
public string GivenName { get; set; } | |
[JsonProperty("identities")] | |
public List<Identity> Identities { get; set; } | |
[JsonProperty("locale")] | |
public string Locale { get; set; } | |
[JsonProperty("name")] | |
public string Name { get; set; } | |
[JsonProperty("nickname")] | |
public string Nickname { get; set; } | |
[JsonProperty("picture")] | |
public string Picture { get; set; } | |
[JsonProperty("user_id")] | |
public string UserId { get; set; } | |
[JsonProperty("global_client_id")] | |
public string GlobalClientId { get; set; } | |
[JsonProperty("persistent")] | |
public dynamic Persistent { get; set; } | |
[JsonProperty("roles")] | |
public List<string> Roles { get; set; } | |
} | |
[DataContract] | |
public class Stats | |
{ | |
[JsonProperty("loginsCount")] | |
public int LoginCount { get; set; } | |
} | |
[DataContract] | |
public class Query | |
{ | |
[JsonProperty("scope")] | |
public string Scope { get; set; } | |
[JsonProperty("response_type")] | |
public string ResponseType { get; set; } | |
[JsonProperty("connection")] | |
public string Connection { get; set; } | |
[JsonProperty("client_id")] | |
public string ClientId { get; set; } | |
[JsonProperty("redirect_uri ")] | |
public string RedirectUri { get; set; } | |
[JsonProperty("state")] | |
public string State { get; set; } | |
} | |
[DataContract] | |
public class Request | |
{ | |
[JsonProperty("query")] | |
public Query Query { get; set; } | |
[JsonProperty("body")] | |
public dynamic Body { get; set; } | |
[JsonProperty("userAgent")] | |
public string UserAgent { get; set; } | |
[JsonProperty("ip")] | |
public string Ip { get; set; } | |
} | |
[DataContract] | |
public class Context | |
{ | |
[JsonProperty("clientID")] | |
public string ClientId { get; set; } | |
[JsonProperty("clientName")] | |
public string ClientName { get; set; } | |
[JsonProperty("connection")] | |
public string Connection { get; set; } | |
[JsonProperty("connectionStrategy")] | |
public string ConnectionStrategy { get; set; } | |
[JsonProperty("samlConfiguration")] | |
public dynamic SamlConfiguration { get; set; } | |
[JsonProperty("protocol")] | |
public string Protocol { get; set; } | |
[JsonProperty("stats")] | |
public Stats Stats { get; set; } | |
[JsonProperty("request")] | |
public Request Request { get; set; } | |
} | |
[DataContract] | |
public class Auth0Request | |
{ | |
[JsonProperty("user")] | |
public Auth0User User { get; set; } | |
[JsonProperty("context")] | |
public Context Context { get; set; } | |
[JsonProperty("secretToken")] | |
public string SecretToken { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment