-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #248 from auth0/add-role-permission-endpoints
Add role permission endpoints to RoleClient
- Loading branch information
Showing
9 changed files
with
169 additions
and
7 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
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
17 changes: 17 additions & 0 deletions
17
src/Auth0.ManagementApi/Models/AssociatePermissionsRequest.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,17 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace Auth0.ManagementApi.Models | ||
{ | ||
/// <summary> | ||
/// Contains details of permissions that should be assigned to a role. | ||
/// </summary> | ||
public class AssociatePermissionsRequest | ||
{ | ||
/// <summary> | ||
/// User IDs to assign to the role. | ||
/// </summary> | ||
[JsonProperty("permissions")] | ||
public IList<PermissionIdentity> Permissions { 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 a permission. | ||
/// </summary> | ||
public class Permission : PermissionIdentity | ||
{ | ||
/// <summary> | ||
/// The name of the resource server. | ||
/// </summary> | ||
[JsonProperty("resource_server_name")] | ||
public string ResourceServerName { get; set; } | ||
|
||
/// <summary> | ||
/// The description of the permission. | ||
/// </summary> | ||
[JsonProperty("description")] | ||
public string Description { 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 properties of a permission that give it its unique identity. | ||
/// </summary> | ||
public class PermissionIdentity | ||
{ | ||
/// <summary> | ||
/// The resource server that the permission is attached to. | ||
/// </summary> | ||
[JsonProperty("resource_server_identifier")] | ||
public string Identifier { get; set; } | ||
|
||
/// <summary> | ||
/// The name of the permission. | ||
/// </summary> | ||
[JsonProperty("permission_name")] | ||
public string Name { 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
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