2using System.Collections.Generic;
3using System.Threading.Tasks;
25 : base(
"Account/VerifyPhoneNr",
26 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
45 string PhoneNr = (string)Parameters[
"PPhoneNr"].AssociatedObjectValue;
46 double Code = (double)Parameters[
"PCode"].AssociatedObjectValue;
57 new Uri(
"https://" + OnboardingDomainName +
"/ID/VerifyNumber.ws"),
58 new Dictionary<string, object>()
64 is Dictionary<string, object> Result))
69 if (!Result.TryGetValue(
"Status", out
object Obj) || !(Obj is
bool Status) || !Status)
71 if (Result.TryGetValue(
"Message", out Obj) && Obj is
string Message)
77 User.Account.PhoneNrVerified = DateTime.UtcNow;
81 User.Account.Enabled =
true;
88 {
"phoneNr", PhoneNr },
89 {
"userName", User.UserName }
Static class managing encoding and decoding of internet content.
static Task< object > PostAsync(Uri Uri, object Data, params KeyValuePair< string, string >[] Headers)
Posts to a resource, using a Uniform Resource Identifier (or Locator).
const string DefaultContentType
application/json
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
Static class managing loading of resources stored as embedded resources or in content files.
static string LoadResourceAsText(string ResourceName)
Loads a text resource from an embedded resource.
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repe...
Represents an HTTP request.
Represets a response of an HTTP client request.
async Task Return(object Object)
Returns an object to the client. This method can only be called once per response,...
The server is currently unable to handle the request due to a temporary overloading or maintenance of...
Represents a case-insensitive string.
static bool IsNullOrEmpty(CaseInsensitiveString value)
Indicates whether the specified string is null or an CaseInsensitiveString.Empty string.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static async Task Update(object Object)
Updates an object in the database.
Class managing a script expression.
DateTime? PhoneNrVerified
When Phone Number was verified.
CaseInsensitiveString EMail
E-mail address associated with account.
DateTime? EMailVerified
When e-Mail was verified.
CaseInsensitiveString PhoneNr
Phone number associated with account.
Account Account
Account object.
Provisioning and registry service component.
static Task< string > GetOnboardingNeuronDomainName()
Gets the domain name of the Nnboarding Neuron.
Verifies an e-mail address corresponding to an account.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
VerifyPhoneNr()
Verifies an e-mail address corresponding to an account.
Abstract base class for agent resources supporting the POST method.
static AccountUser AssertUserAuthenticated(HttpRequest Request)
Makes sure the request is made by an authenticated API user.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd