Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3572693
D6024.id20098.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6024.id20098.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
@@ -52,6 +52,7 @@
accountDeletionResponder,
accountCreationResponder,
logInResponder,
+ siweAuthResponder,
oldPasswordUpdateResponder,
updateUserSettingsResponder,
policyAcknowledgmentResponder,
@@ -234,6 +235,10 @@
responder: siweNonceResponder,
requiredPolicies: [],
},
+ siwe_auth: {
+ responder: siweAuthResponder,
+ requiredPolicies: [],
+ },
};
export { jsonEndpoints };
diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js
--- a/keyserver/src/responders/user-responders.js
+++ b/keyserver/src/responders/user-responders.js
@@ -293,6 +293,10 @@
return response;
}
+async function siweAuthResponder(): Promise<string> {
+ return 'UNIMPLEMENTED';
+}
+
const updatePasswordRequestInputValidator = tShape({
code: t.String,
password: tPassword,
@@ -357,6 +361,7 @@
accountDeletionResponder,
accountCreationResponder,
logInResponder,
+ siweAuthResponder,
oldPasswordUpdateResponder,
updateUserSettingsResponder,
policyAcknowledgmentResponder,
diff --git a/lib/actions/siwe-actions.js b/lib/actions/siwe-actions.js
--- a/lib/actions/siwe-actions.js
+++ b/lib/actions/siwe-actions.js
@@ -14,4 +14,16 @@
return response.nonce;
};
-export { getSIWENonceActionTypes, getSIWENonce };
+const siweAuthActionTypes = Object.freeze({
+ started: 'SIWE_AUTH_STARTED',
+ success: 'SIWE_AUTH_SUCCESS',
+ failed: 'SIWE_AUTH_FAILED',
+});
+const siweAuth = (
+ callServerEndpoint: CallServerEndpoint,
+): (() => Promise<string>) => async () => {
+ const response = await callServerEndpoint('siwe_auth');
+ return response;
+};
+
+export { getSIWENonceActionTypes, getSIWENonce, siweAuthActionTypes, siweAuth };
diff --git a/lib/types/endpoints.js b/lib/types/endpoints.js
--- a/lib/types/endpoints.js
+++ b/lib/types/endpoints.js
@@ -81,6 +81,7 @@
UPDATE_USER_SUBSCRIPTION: 'update_user_subscription',
VERIFY_CODE: 'verify_code',
SIWE_NONCE: 'siwe_nonce',
+ SIWE_AUTH: 'siwe_auth',
});
type SocketPreferredEndpoint = $Values<typeof socketPreferredEndpoints>;
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -893,6 +893,22 @@
+error: true,
+payload: Error,
+loadingInfo: LoadingInfo,
+ }
+ | {
+ +type: 'SIWE_AUTH_STARTED',
+ +payload?: void,
+ +loadingInfo: LoadingInfo,
+ }
+ | {
+ +type: 'SIWE_AUTH_SUCCESS',
+ +payload?: void,
+ +loadingInfo: LoadingInfo,
+ }
+ | {
+ +type: 'SIWE_AUTH_FAILED',
+ +error: true,
+ +payload: Error,
+ +loadingInfo: LoadingInfo,
};
export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 29, 12:33 PM (7 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2732189
Default Alt Text
D6024.id20098.diff (2 KB)
Attached To
Mode
D6024: [keyserver] Introduce basic scaffolding for `siwe_auth` endpoint
Attached
Detach File
Event Timeline
Log In to Comment