Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3502742
D5884.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5884.diff
View Options
diff --git a/keyserver/src/endpoints.js b/keyserver/src/endpoints.js
--- a/keyserver/src/endpoints.js
+++ b/keyserver/src/endpoints.js
@@ -32,6 +32,7 @@
errorReportFetchInfosResponder,
} from './responders/report-responders';
import { userSearchResponder } from './responders/search-responders';
+import { siweNonceResponder } from './responders/siwe-nonce-responders';
import {
threadDeletionResponder,
roleUpdateResponder,
@@ -224,6 +225,10 @@
responder: codeVerificationResponder,
requiredPolicies: baseLegalPolicies,
},
+ siwe_nonce: {
+ responder: siweNonceResponder,
+ requiredPolicies: [],
+ },
};
export { jsonEndpoints };
diff --git a/keyserver/src/responders/siwe-nonce-responders.js b/keyserver/src/responders/siwe-nonce-responders.js
new file mode 100644
--- /dev/null
+++ b/keyserver/src/responders/siwe-nonce-responders.js
@@ -0,0 +1,7 @@
+// @flow
+
+async function siweNonceResponder(): Promise<string> {
+ return 'UNIMPLEMENTED';
+}
+
+export { siweNonceResponder };
diff --git a/lib/actions/siwe-actions.js b/lib/actions/siwe-actions.js
new file mode 100644
--- /dev/null
+++ b/lib/actions/siwe-actions.js
@@ -0,0 +1,17 @@
+// @flow
+
+import type { CallServerEndpoint } from '../utils/call-server-endpoint';
+
+const getSIWENonceActionTypes = Object.freeze({
+ started: 'GET_SIWE_NONCE_STARTED',
+ success: 'GET_SIWE_NONCE_SUCCESS',
+ failed: 'GET_SIWE_NONCE_FAILED',
+});
+const getSIWENonce = (
+ callServerEndpoint: CallServerEndpoint,
+): (() => Promise<string>) => async () => {
+ const nonce = await callServerEndpoint('siwe_nonce');
+ return nonce;
+};
+
+export { getSIWENonceActionTypes, getSIWENonce };
diff --git a/lib/types/endpoints.js b/lib/types/endpoints.js
--- a/lib/types/endpoints.js
+++ b/lib/types/endpoints.js
@@ -79,6 +79,7 @@
UPDATE_THREAD: 'update_thread',
UPDATE_USER_SUBSCRIPTION: 'update_user_subscription',
VERIFY_CODE: 'verify_code',
+ SIWE_NONCE: 'siwe_nonce',
});
type SocketPreferredEndpoint = $Values<typeof socketPreferredEndpoints>;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 5:04 AM (18 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2685982
Default Alt Text
D5884.diff (1 KB)
Attached To
Mode
D5884: [lib][keyserver] Introduce basic scaffolding for `siwe_nonce` endpoint
Attached
Detach File
Event Timeline
Log In to Comment