-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Managing SCIM configuration (#726)
- Loading branch information
Showing
11 changed files
with
601 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace Auth0.ManagementApi.Models | ||
{ | ||
/// <summary> | ||
/// Represents an SCIM Configuration | ||
/// </summary> | ||
public class ScimConfiguration | ||
{ | ||
/// <summary> | ||
/// The connection's identifier | ||
/// </summary> | ||
[JsonProperty("connection_id")] | ||
public string ConnectionId { get; set; } | ||
|
||
/// <summary> | ||
/// The connection's identifier | ||
/// </summary> | ||
[JsonProperty("connection_name")] | ||
public string ConnectionName { get; set; } | ||
|
||
/// <summary> | ||
/// The connection's strategy | ||
/// </summary> | ||
[JsonProperty("strategy")] | ||
public string Strategy { get; set; } | ||
|
||
/// <summary> | ||
/// The tenant's name | ||
/// </summary> | ||
[JsonProperty("tenant_name")] | ||
public string TenantName { get; set; } | ||
|
||
/// <summary> | ||
/// User ID attribute for generating unique user ids | ||
/// </summary> | ||
[JsonProperty("user_id_attribute")] | ||
public string UserIdAttribute { get; set; } | ||
|
||
/// <summary> | ||
/// The mapping between auth0 and SCIM | ||
/// </summary> | ||
[JsonProperty("mapping")] | ||
public List<ScimMapping> Mapping { get; set; } | ||
|
||
/// <summary> | ||
/// The Date Time SCIM Configuration was created | ||
/// </summary> | ||
[JsonProperty("created_at")] | ||
public string CreatedAt { get; set; } | ||
|
||
/// <summary> | ||
/// The Date Time SCIM Configuration was last updated | ||
/// </summary> | ||
[JsonProperty("updated_on")] | ||
public string UpdatedOn { get; set; } | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Auth0.ManagementApi/Models/Scim/ScimConfigurationCreateRequest.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Auth0.ManagementApi.Models | ||
{ | ||
public class ScimConfigurationCreateRequest | ||
{ | ||
/// <summary> | ||
/// User ID attribute for generating unique user ids | ||
/// </summary> | ||
[JsonProperty("user_id_attribute")] | ||
public string UserIdAttribute { get; set; } | ||
|
||
/// <summary> | ||
/// The mapping between auth0 and SCIM | ||
/// </summary> | ||
[JsonProperty("mapping")] | ||
public List<ScimMapping> Mapping { get; set; } | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Auth0.ManagementApi/Models/Scim/ScimConfigurationUpdateRequest.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Auth0.ManagementApi.Models | ||
{ | ||
public class ScimConfigurationUpdateRequest | ||
{ | ||
/// <summary> | ||
/// User ID attribute for generating unique user ids | ||
/// </summary> | ||
[JsonProperty("user_id_attribute")] | ||
public string UserIdAttribute { get; set; } | ||
|
||
/// <summary> | ||
/// The mapping between auth0 and SCIM | ||
/// </summary> | ||
[JsonProperty("mapping")] | ||
public List<ScimMapping> Mapping { get; set; } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Auth0.ManagementApi.Models | ||
{ | ||
/// <summary> | ||
/// Represents the mapping between SCIM and Auth0 | ||
/// </summary> | ||
public class ScimMapping | ||
{ | ||
/// <summary> | ||
/// The field location in the auth0 schema | ||
/// </summary> | ||
[JsonProperty("auth0")] | ||
public string Auth0 { get; set; } | ||
|
||
/// <summary> | ||
/// The field location in the SCIM schema | ||
/// </summary> | ||
[JsonProperty("scim")] | ||
public string Scim { get; set; } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Auth0.ManagementApi.Models | ||
{ | ||
public class ScimToken : ScimTokenBase | ||
{ | ||
/// <summary> | ||
/// The token's last used at timestamp | ||
/// </summary> | ||
[JsonProperty("last_used_at")] | ||
public string LastUsedAt { get; set; } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace Auth0.ManagementApi.Models | ||
{ | ||
/// <summary> | ||
/// Represents an SCIM token for an SCIM client. | ||
/// </summary> | ||
public class ScimTokenBase | ||
{ | ||
/// <summary> | ||
/// The token's identifier | ||
/// </summary> | ||
[JsonProperty("token_id")] | ||
public string TokenId { get; set; } | ||
|
||
/// <summary> | ||
/// The scopes of the scim token | ||
/// </summary> | ||
[JsonProperty("scopes")] | ||
public string[] Scopes { get; set; } | ||
|
||
/// <summary> | ||
/// The token's created at timestamp | ||
/// </summary> | ||
[JsonProperty("created_at")] | ||
public string CreatedAt { get; set; } | ||
|
||
/// <summary> | ||
/// The token's valid until at timestamp | ||
/// </summary> | ||
[JsonProperty("valid_until")] | ||
public string ValidUntil { get; set; } | ||
} | ||
} |
Oops, something went wrong.