Repository navigation
Conversation
find_by_identifier now uses the user list (GET /v1/:app_id/users, q=...) with the secret key and keeps only an exact match: the email in any case, or the phone compared as digits. It returns nil when nobody by that identifier uses the app, never creates a user, makes no call for a blank identifier, and follows the list's pages, up to 10 pages of 100. sessions.list and sessions.revoke work with the app's secret key alone; the docs and README say so. The live suite's examples for these (listing and revoking sessions, a refreshed token verifying locally, find_by_identifier for nobody) are normal examples again, and a new one checks the exact match by email and by phone: 74 examples, 0 failures, 1 pending against scute-api-v2 v23.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors the Python SDK change.
users.find_by_identifierGET /v1/:app_id/userswithq,limit=100,page) and keeps only an exact match:qis a loose search, so it can answer near-identical users; they don't count.next_pagefor up to 10 pages.users.getshows it.Sessions
sessions.listandsessions.revokework with the secret key alone, no user session needed. The docs, README and CHANGELOG say so.Live suite
The examples that were pending on API behavior are normal examples again:
find_by_identifieranswering nil for nobody (and making nobody).A new example checks the exact match against the real, loose search, by email (in another case) and by phone (formatted differently).
Results:
bundle exec rake liveagainst scute-api-v2 v23: 74 examples, 0 failures, 1 pending. The pending one is a skip: scute-ruby has no local decision engine for the policy snapshot.After the run, the suite's app has no users, agents, properties or policy left, and its settings are back to their defaults.