-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'AddNewPnPAzureADUserTemporaryAccessPass' of https://git…
…hub.com/KoenZomers/pnpframework into pr605
- Loading branch information
Showing
3 changed files
with
147 additions
and
1 deletion.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
src/lib/PnP.Framework/Graph/Model/TemporaryAccessPassRequest.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,35 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace PnP.Framework.Graph.Model | ||
{ | ||
/// <summary> | ||
/// Defines a request for a temporary access pass for a User | ||
/// </summary> | ||
public class TemporaryAccessPassRequest | ||
{ | ||
/// <summary> | ||
/// Indicates the type(s) of change(s) in the subscribed resource that will raise a notification | ||
/// </summary> | ||
[JsonProperty("@odata.type")] | ||
public string ODataType => "#microsoft.graph.temporaryAccessPassAuthenticationMethod"; | ||
|
||
/// <summary> | ||
/// Date and time on which the temporary access pass should become valid. If not provided, the access pass will be valid immediately. | ||
/// </summary> | ||
[JsonProperty("startDateTime")] | ||
public DateTime? StartDateTime { get; set; } | ||
|
||
/// <summary> | ||
/// The time in minutes specifying how long the temporary access pass should be valid for. If not provided, the default duration as configured in Azure Active Directory will be applied. | ||
/// </summary> | ||
[JsonProperty("lifetimeInMinutes")] | ||
public int? LifetimeInMinutes { get; set; } | ||
|
||
/// <summary> | ||
/// Boolean indicating if the temporary access pass can only be used once to log in (true) or continously for as long as the pass is valid for (false) | ||
/// </summary> | ||
[JsonProperty("isUsableOnce")] | ||
public bool? IsUsableOnce { get; set; } | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
src/lib/PnP.Framework/Graph/Model/TemporaryAccessPassResponse.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,59 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace PnP.Framework.Graph.Model | ||
{ | ||
/// <summary> | ||
/// Defines a response for a temporary access pass for a User | ||
/// </summary> | ||
public class TemporaryAccessPassResponse | ||
{ | ||
/// <summary> | ||
/// Identifier of the temporary access pass | ||
/// </summary> | ||
[JsonProperty("id")] | ||
public Guid? Id { get; set; } | ||
|
||
/// <summary> | ||
/// The temporary access pass code | ||
/// </summary> | ||
[JsonProperty("temporaryAccessPass")] | ||
public string TemporaryAccessPass { get; set; } | ||
|
||
/// <summary> | ||
/// Date and time on which the temporary access pass has been created | ||
/// </summary> | ||
[JsonProperty("createdDateTime")] | ||
public DateTime? CreatedDateTime { get; set; } | ||
|
||
/// <summary> | ||
/// Date and time on which the temporary access pass should become valid. If not provided, the access pass will be valid immediately. | ||
/// </summary> | ||
[JsonProperty("startDateTime")] | ||
public DateTime? StartDateTime { get; set; } | ||
|
||
/// <summary> | ||
/// The time in minutes specifying how long the temporary access pass should be valid for. If not provided, the default duration as configured in Azure Active Directory will be applied. | ||
/// </summary> | ||
[JsonProperty("lifetimeInMinutes")] | ||
public int? LifetimeInMinutes { get; set; } | ||
|
||
/// <summary> | ||
/// Boolean indicating if the temporary access pass can only be used once to log in (true) or continously for as long as the pass is valid for (false) | ||
/// </summary> | ||
[JsonProperty("isUsableOnce")] | ||
public bool? IsUsableOnce { get; set; } | ||
|
||
/// <summary> | ||
/// Boolean indicating if the temporary access pass can be used already | ||
/// </summary> | ||
[JsonProperty("isUsable")] | ||
public bool? IsUsable { get; set; } | ||
|
||
/// <summary> | ||
/// Provides more context around why the pass can or can not be used yet | ||
/// </summary> | ||
[JsonProperty("methodUsabilityReason")] | ||
public string MethodUsabilityReason { 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