3using System.Threading.Tasks;
26 : base(
"Account/VerifyPhoneNr",
27 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
46 string PhoneNr = (string)Parameters[
"PPhoneNr"].AssociatedObjectValue;
47 double Code = (double)Parameters[
"PCode"].AssociatedObjectValue;
63 new Uri(
"https://" + OnboardingDomainName +
"/ID/VerifyNumber.ws"),
64 new Dictionary<string, object>()
83 if (!Result.TryGetValue(
"Status", out
object Obj) || !(Obj is
bool Status) || !Status)
85 if (Result.TryGetValue(
"Message", out Obj) && Obj is
string Message)
93 User.Account.PhoneNrVerified = DateTime.UtcNow;
98 User.Account.Enabled =
true;
105 {
"phoneNr", PhoneNr },
106 {
"userName", User.UserName }
Contains information about a response to a content request.
bool HasError
If an error occurred.
object Decoded
Decoded object.
Exception Error
Error response.
Static class managing encoding and decoding of internet content.
static Task< ContentResponse > 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 ...
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 SendResponse()
Sends the response back to the client. If the resource is synchronous, there's no need to call this m...
Task Return(Exception ex)
Returns an error to the client.
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.
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.
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.
Legal (digital identities, smart contracts) 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