Closed andrewatwood closed 4 years ago
Also open to general structure and organization feedback from @slifty and @jasonaowen as well!
I don't see any new tests for this new public method. Can you add some?
Edit: JK, wasn't looking hard enough. I'm going to pass this review along to someone else. LGTM.
I'd also like to see the functionality added here documented in the README before merging.
Great point! Can definitely update the README.
@andrewatwood some of the commits in this PR were made without a committer email address, which we should fix. The rest use your personal email address; is that what you intended? Make sure to set your email address in git, and then I'd be happy to pair on rebasing to fix these commits!
@jasonaowen hmm was confused for a minute trying to figure that out, but realized those email-less were edits from the GitHub UI I made on 'main' to set up some Actions and other repo housekeeping stuff, and synced back in to this branch for the PR. Didn't realize it didn't have an email on the commits, seems bizarre for a default behavior...Still open to fixing that if you'd like!
Thanks for pairing with me on rebasing, @andrewatwood! I'll work on testing this now.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Feature
What is the current behavior? (You can also link to an open issue here) No public methods exposed on the SDK client instance.
What is the new behavior (if this is a feature change)? Sets up the API service to make standardized API requests, and sets up the first public methods on the client via
AuthResource
, which contains a methodisSessionValid
Testing
permSession
andpermMFA
cookies, and the API key from the request body on anypermanent.org/api
const perm = new Permanent()
and test thatperm.auth.isSessionValid()
resolves totrue