Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3572981
D6025.id20125.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
D6025.id20125.diff
View Options
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,7 +293,18 @@
return response;
}
-async function siweAuthResponder(): Promise<string> {
+const siweAuthRequestInputValidator = tShape({
+ signature: t.String,
+ message: t.String,
+ calendarQuery: t.maybe(entryQueryInputValidator),
+ deviceTokenUpdateRequest: t.maybe(deviceTokenUpdateRequestInputValidator),
+ platformDetails: tPlatformDetails,
+ watchedIDs: t.list(t.String),
+});
+
+async function siweAuthResponder(viewer: Viewer, input: any): Promise<string> {
+ await validateInput(viewer, siweAuthRequestInputValidator, input);
+
return 'UNIMPLEMENTED';
}
diff --git a/lib/types/siwe-types.js b/lib/types/siwe-types.js
--- a/lib/types/siwe-types.js
+++ b/lib/types/siwe-types.js
@@ -1,9 +1,24 @@
// @flow
+import {
+ type DeviceTokenUpdateRequest,
+ type PlatformDetails,
+} from './device-types';
+import { type CalendarQuery } from './entry-types';
+
export type SIWENonceResponse = {
+nonce: string,
};
+export type SIWEAuthRequest = {
+ +message: string,
+ +signature: string,
+ +calendarQuery?: ?CalendarQuery,
+ +deviceTokenUpdateRequest?: ?DeviceTokenUpdateRequest,
+ +platformDetails: PlatformDetails,
+ +watchedIDs: $ReadOnlyArray<string>,
+};
+
// This is a message that the rendered webpage (landing/siwe.react.js) uses to
// communicate back to the React Native WebView that is rendering it
// (native/account/siwe-panel.react.js)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 29, 1:37 PM (6 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2729319
Default Alt Text
D6025.id20125.diff (1 KB)
Attached To
Mode
D6025: [lib][keyserver] Introduce `SIWEAuthRequest` and `siweAuthRequestInputValidator`
Attached
Detach File
Event Timeline
Log In to Comment