Skip to content
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

Added TTL renewal of credentials in CredentialsManager [SDK-1818] #399

Merged
merged 6 commits into from
Jul 27, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Swapped scope values
  • Loading branch information
Widcket committed Jul 24, 2020
commit 548ee4472061e2ac1974c36320b6ba2b4004f2fc
4 changes: 2 additions & 2 deletions Auth0Tests/CredentialsManagerSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ class CredentialsManagerSpec: QuickSpec {
}

it("should yield a new access token with a new scope") {
credentials = Credentials(accessToken: AccessToken, refreshToken: RefreshToken, expiresIn: Date(timeIntervalSinceNow: ExpiresIn), scope: "openid profile")
credentials = Credentials(accessToken: AccessToken, refreshToken: RefreshToken, expiresIn: Date(timeIntervalSinceNow: ExpiresIn), scope: "openid profile offline_access")
_ = credentialsManager.store(credentials: credentials)
waitUntil(timeout: 2) { done in
credentialsManager.credentials(withScope: "openid profile offline_access", minTTL: 0) { error, newCredentials in
credentialsManager.credentials(withScope: "openid profile", minTTL: 0) { error, newCredentials in
expect(error).to(beNil())
expect(newCredentials?.accessToken) == NewAccessToken
done()
Expand Down