Skip to content

Keyring core support for standalone keys/tokens #110

@mdrovdahl

Description

@mdrovdahl

While writing a proof-of-concept importer for the 1Password Events API, I wanted to store the API token in Keyring and leverage the Keyring Social Importer framework (for continuous import). The 1Password API token is generated in a standalone manner on 1Password.com (not an OAuth flow). From what I could tell, there are no existing Keying Services for such a use-case, where the input to Keyring is a pre-generated token.

For my purposes, I implement this as a new "Core" service (token.php) which accepts for input via UI a key/token, stores it, does the basic validation request and then makes it available via standard Keyring methods.

I think this use-case may have overlap with what @pablinos has written up in #93 and probably has more general use as well.

So, my question is...does this approach make sense? As a new "Core" service? If so, I'm happy to share my code...though it will definitely need review, as it's prototype quality, not production "ready", and only used on my local machine.

There are obviously more lightweight ways to store a key in the database, but I like the idea of centralizing key/token storage within Keyring. Hope you do too =)

cc: @beaulebens

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions