-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
personal key auth #156
personal key auth #156
Conversation
projects/js-upload-api/src/File.ts
Outdated
@@ -312,7 +313,7 @@ export class File { | |||
|
|||
/////////////////////////////////////////////////////////////////////////////// | |||
|
|||
private fillMetadata(data: any, client: Client): void { | |||
private fillMetadata(data: any, client: Client | ClientPkey): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, AbstractClient
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, agreed w/ decision to separate out the base client from diff authentication entrypoints
-
js-upload-api
is an internal class; we should exportClientPKey
+AbstractClient
toclient-api
,client-api-react
,node-api
for per-environment use. This may require a similar dual-client export, e.g.,export class ClientPKey extends ClientPKeyBase
:export class Client extends ClientBase { -
instead of hard-coding
Client | ClientPkey
everywhere, we should be passing aroundAbstractClient
where possible, or a new interfaceClientI
-
I was a bit unsure about error handling, esp for explainability for devs + propagating to end-users
After this one goes in, we may want a quick follow-up on ensuring docs go through too (or as part, either way)
This reverts commit bbf5d48.
lets split this into two, this first part can go in alone and the second part which will include changes to graphistry/graphistry in order to allow POST to the pkey endpoint and re-add org to |
projects/client-api/src/index.js
Outdated
clientProtocolHostname, | ||
version | ||
) { | ||
console.debug('new client', { personalKeyId }, { personalKeySecret }, { protocol }, { host }, { clientProtocolHostname }, { version }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we drop the debug statements, as they'll be in customer code vs ours?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(i'm esp thinking any that print the creds)
FWIW, have you done live testing, e.g., in storybook + node, or elsewhere? |
|
solves #80
includes feature code and documentation
example of pkey interface in use: