3using System.Threading.Tasks;
30 : base(
"Crypto/GetPublicKey",
31 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
52 this.jwtAuthentication = JwtAuth;
75 if (Parameters.TryGetValue(
"PKeyId", out
IElement E) && !(E is
null) && E.AssociatedObjectValue is
string s)
78 if (
string.IsNullOrEmpty(KeyId))
84 Namespace = Endpoint.Namespace;
102 PublicKey = AgentKey.PublicKey ?? Array.Empty<
byte>();
108 {
"key", Convert.ToBase64String(PublicKey) },
109 {
"Algorithm",
new Dictionary<string, object>()
111 {
"localName", Endpoint.LocalName },
112 {
"namespace", Namespace },
113 {
"securityStrength", Endpoint.SecurityStrength },
114 {
"safe", Endpoint.Safe },
115 {
"slow", Endpoint.Slow },
116 {
"pqc", Endpoint.PostQuantumCryptography },
117 {
"score", Endpoint.Score }
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
The server understood the request, but is refusing to fulfill it. Authorization will not help and the...
Base class for all HTTP authentication schemes, as defined in RFC-7235: https://datatracker....
Represents an HTTP request.
Represets a response of an HTTP client request.
Task Return(Exception ex)
Returns an error to the client.
The server has not found anything matching the Request-URI. No indication is given of whether the con...
The server is currently unable to handle the request due to a temporary overloading or maintenance of...
Abstract base class for Elliptic Curve endpoints.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
This filter selects objects that conform to all child-filters provided.
This filter selects objects that have a named field equal to a given value.
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.
Use JWT tokens for authentication. The Bearer scheme defined in RFC 6750 is used: https://tools....
override async Task< IUser > IsAuthenticated(HttpRequest Request)
Checks if the request is authorized.
bool Enabled
If account is enabled
Account Account
Account object.
string UserName
User Name.
Abstract base class for agent resources supporting the POST method.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd
Contains an encrypted key for an agent.
string Namespace
Namespace of algorithm
string LocalName
Local Name of algorithm
Gets available cryptographic algorithms.
static bool TryGetAlgorithm(string LocalName, string Namespace, out EllipticCurveEndpoint Algorithm)
Tries to get an algorithm given its fully qualified name.
Gets the public key of the server.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
GetPublicKey()
Gets the public key of the server.
override HttpAuthenticationScheme[] GetAuthenticationSchemes(HttpRequest Request)
Any authentication schemes used to authenticate users before access is granted to the corresponding r...
static LedgerConfiguration Instance
Current instance of configuration.
string SignatureAlgorithm
Name of signature algorithm.
byte[] PublicKey
Public key used to validate signatures.
Basic interface for all types of elements.