Skip to content

Support injectable custom TokenStore#2

Open
lucasfischer wants to merge 1 commit into
mainfrom
public-token-store
Open

Support injectable custom TokenStore#2
lucasfischer wants to merge 1 commit into
mainfrom
public-token-store

Conversation

@lucasfischer
Copy link
Copy Markdown
Contributor

Make the TokenStore protocol and FileTokenStore public, and add an optional tokenStore parameter to AmoreLicensing.init like proposed by @atomicgeese in #1.

This lets callers persist the license token in a backend the library does not own (for example, the Keychain or a shared container) so the token can be reached from contexts the default file store cannot serve, such as an app and its extensions. The parameter defaults to a FileTokenStore in Application Support, so existing callers are unaffected.

Also documents the new public surface and curates it under a Token Storage topic in the DocC index.

Make the TokenStore protocol and FileTokenStore public, and add an
optional tokenStore parameter to AmoreLicensing.init.

This lets callers persist the license token in a backend the library
does not own (for example, the Keychain or a shared container) so the
token can be reached from contexts the default file store cannot serve,
such as an app and its extensions. The parameter defaults to a
FileTokenStore in Application Support, so existing callers are
unaffected.

Also documents the new public surface and curates it under a Token
Storage topic in the DocC index.

Co-authored-by: Dave Camp <dave@thinbits.com>
@atomicgeese
Copy link
Copy Markdown

Checked out this branch and hooked up my keychain store through the new API and it worked as expected. Thanks!

@lucasfischer
Copy link
Copy Markdown
Contributor Author

Thank you for testing @atomicgeese. Will create a new release soon.

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