3using System.Threading.Tasks;
27 : base(
"Account/ResendVerificationCodes",
28 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
50 string EMail = (string)Parameters[
"PEMail"]?.AssociatedObjectValue;
51 string PhoneNr = (string)Parameters[
"PPhoneNr"]?.AssociatedObjectValue;
52 string Language = (string)Parameters[
"PLanguage"].AssociatedObjectValue;
54 if (!
string.IsNullOrEmpty(PhoneNr) &&
57 await Response.
SendResponse(
new BadRequestException(
"Phone numbers must be provided using the international number format, starting with +, then the country code, then the number."));
77 if (!
string.IsNullOrEmpty(EMail) && EMail !=
Account.
EMail)
100 if (!
string.IsNullOrEmpty(EMail))
103 new Uri(
"https://" + OnboardingDomainName +
"/ID/SendVerificationMessage.ws"),
104 new Dictionary<string, object>()
108 {
"Language", Language }
124 if (!EMailResult.TryGetValue(
"Status", out
object Obj) || !(Obj is
bool Status) || !Status)
126 if (EMailResult.TryGetValue(
"Message", out Obj) && Obj is
string Message)
138 new Uri(
"https://" + OnboardingDomainName +
"/ID/SendVerificationMessage.ws"),
139 new Dictionary<string, object>()
143 {
"Language", Language }
159 if (!SmsResult.TryGetValue(
"Status", out
object Obj) || !(Obj is
bool Status2) || !Status2)
161 if (SmsResult.TryGetValue(
"Message", out Obj) && Obj is
string Message)
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...
The server understood the request, but is refusing to fulfill it. Authorization will not help and the...
Represents an HTTP request.
string RemoteEndPoint
Remote end-point.
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 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.
Class that monitors login events, and help applications determine malicious intent....
static void Fail(string Message, string UserName, string RemoteEndPoint, string Protocol)
Handles a failed login attempt.
Contains information about a broker account.
DateTime? PhoneNrVerified
When Phone Number was verified.
CaseInsensitiveString EMail
E-mail address associated with account.
bool Enabled
If account is enabled
DateTime? EMailVerified
When e-Mail was verified.
CaseInsensitiveString PhoneNr
Phone number associated with account.
Account Account
Account object.
string UserName
User Name.
Legal (digital identities, smart contracts) service component.
static Task< string > GetOnboardingNeuronDomainName()
Gets the domain name of the Nnboarding Neuron.
Creates an account on the server.
static readonly Regex InternationalNumberFormat
International phone number format.
Resends verification codes for an account being onboarded on the server.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
ResendVerificationCodes()
Resends verification codes for an account being onboarded on the server.
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
async Task CheckBlocks(HttpRequest Request)
Checks if the client is blocked.