Skip to content

Commit

Permalink
Added extra properties to merchant token for shared secret operation. (
Browse files Browse the repository at this point in the history
…#467)

* Added extra properties to merfhant token for shared secret operation.

* Fixed comment typo.
  • Loading branch information
sipsorcery authored Nov 25, 2024
1 parent 170fbfa commit 9d5fefb
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/NoFrixion.MoneyMoov/Models/Token/MerchantToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,33 @@ public class MerchantToken
/// initially created. The token is not stored by NoFrixion.
/// </summary>
public string Token { get; set; }

/// <summary>
/// If set to false the merchant token will not be accepted to authorise a request.
/// </summary>
public bool IsEnabled { get; set; }

/// <summary>
/// Optional shared secret algorithm to use for HMAC authentication.
/// </summary>
public SharedSecretAlgorithmsEnum SharedSecretAlgorithm { get; set; }

/// <summary>
/// The base 64 encoded shared secret that is used for request authentication with an HMAC.
/// Note this property will ONLY be set when the token is initially created. It is not possible
/// to retrieve the secret afterwards. If it is lost a new token should be created.
/// </summary>
public string SharedSecretBase64 { get; set; }

/// <summary>
/// Represent the version of the overall merchant token. This field is to allow the secret and public key mechanisms to
/// vary over time. For example if the HTTP header fields to include in the algorithms change this version will faciliatate
/// keeping track of which signature versions a particular merchant token is using.
/// </summary>
public int RequestSignatureVersion { get; set; }

/// <summary>
/// Optional. If set indicates the merchant token is not valid after the specified expiry date.
/// </summary>
public DateTimeOffset? ExpiresAt { get; set; }
}

0 comments on commit 9d5fefb

Please sign in to comment.