Skip to content

Add option to cache token#2

Merged
nederdirk merged 2 commits intomasterfrom
cache-token
Sep 12, 2018
Merged

Add option to cache token#2
nederdirk merged 2 commits intomasterfrom
cache-token

Conversation

@timmipetit
Copy link
Copy Markdown
Member

Without caching a new token will be generated for every request, which can get quite slow.

Comment thread examples/save-token.php
Comment thread examples/use-saved-token.php
Comment thread src/Identity/Swauth/Models/ServiceCatalog.php
return $this;
}

public function export(): array
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ibid, is public access to the object properties necessary?

Comment thread src/Identity/Swauth/Service.php Outdated
Comment thread src/Identity/Swauth/Service.php
];
}

public function generateTokenFromCache(array $cachedToken): Token
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider to document which interface this function implements

Comment thread src/Identity/Swauth/Service.php
@nederdirk nederdirk merged commit 82cfaf6 into master Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants