mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-09 03:52:13 +00:00
18 lines
422 B
Markdown
18 lines
422 B
Markdown
# `kumo.secrets.load(SOURCE)`
|
|
|
|
Given a [keysource](../keysource.md), load and return the bytes stored in that source.
|
|
|
|
## Example of Loading a credential from a vault
|
|
|
|
```lua
|
|
local request = kumo.http.build_client({}):get 'https://example.com/'
|
|
|
|
local passwd = kumo.secrets.load {
|
|
vault_mount = 'secret',
|
|
vault_path = 'example.com-passwd',
|
|
}
|
|
request:basic_auth('username', passwd)
|
|
|
|
local response = request:send()
|
|
```
|