Internally, keyring supports get_credential, which is useful for backends which can supply their own username. This adds an exposed get_credential in the cli - keyring --mode creds get [service] [OPTIONAL - username]
This also adds support for JSON output type via --output json option
Help text for reference:
--output {plain,json}
Output format for 'get' operation. Default is 'plain'
--mode {password,creds}
Mode for 'get' operation. 'password' requires a username and will return only the password.
'creds' does not require a username and will return both the username and password separated by
a newline. Default is 'password'
Example output:
➜ keyring --mode creds get https://example.com/
hello
world
➜ keyring --mode creds --output json get https://example.com/
{"username": "hello", "password": "world"}
➜ keyring --output json get https://example.com/ hello
{"password": "world"}
Internally,
keyring
supportsget_credential
, which is useful for backends which can supply their own username. This adds an exposedget_credential
in the cli -keyring --mode creds get [service] [OPTIONAL - username]
This also adds support for JSON output type via
--output json
optionHelp text for reference:
Example output: