Initial Commit ...

This commit is contained in:
2024-01-25 04:42:47 +03:30
commit 844b4c47ad
50 changed files with 2615 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
using xCommons.Extensions;
using xIdentityModels.Constants;
namespace xIdentityModels.Models {
public class XActionRequestToken {
public XAction Action { get; set; }
public XActionRequestContext Context { get; set; }
public string Token { get; set; }
public void Prepare (string secret) {
Token = (Action.ToString () +
secret +
Context.ToJSON ()).ToMd5String ();
}
public bool Validate (string secret) {
return (Action.ToString () +
secret +
Context.ToJSON ()).ToMd5String () == Token;
}
}
}