Aura.Model.HexAPIKey (Aura v1.0.1)
View SourceA struct describing an API key record coming from a Hex-compliant API.
Examples
%Aura.Model.HexAPIKey{
authing_key: false,
secret: "3321e19a16017725ced9fe56a0071aa6",
inserted_at: ~U[2025-06-02 04:26:33.915977Z],
name: "veniam.ut",
permissions: [
%{domain: "api", resource: "read"},
%{domain: "api", resource: "write"}
],
revoked_at: nil,
updated_at: ~U[2025-06-02 04:26:33.915977Z],
url: "http://localhost:4000/api/keys/veniam.ut"
}
Resources
- Hex
- Contact the maintainer (he's happy to help!)
See Also
Summary
Types
A permission realm belonging to this API key
Whether this key is the one currently being used to make authenticated requests
A domain for which this API key is valid
What kind of operations this API key can do within its domain
DateTime
when this key became invalid
The API key payload - it is only provided once, upon creation; always nil
after.
Type describing an API key coming from a Hex-compliant API.
Types
A permission realm belonging to this API key
Keys
- domain ::
Aura.Model.HexAPIKey.domain/0
- resource ::
Aura.Model.HexAPIKey.resource/0
Examples
%{domain: "api", resource: "read"}
%{domain: "api", resource: "write"}
See Also
@type authing_key() :: boolean()
Whether this key is the one currently being used to make authenticated requests
See Also
@type domain() :: String.t()
A domain for which this API key is valid
@type resource() :: String.t()
What kind of operations this API key can do within its domain
@type revoked_date_time() :: DateTime.t() | nil
DateTime
when this key became invalid
Examples
~U[2025-05-29 18:15:18.244790Z]
See Also
@type secret() :: String.t() | nil
The API key payload - it is only provided once, upon creation; always nil
after.
🔒 Security
Guard this secret payload with your life - never keep it as plain text in your code.
Examples
"3321e19a16017725ced9fe56a0071aa6"
See Also
@type t() :: %Aura.Model.HexAPIKey{ authing_key: authing_key(), inserted_at: Aura.Model.Common.inserted_at(), name: Aura.Common.api_key_name(), permissions: [api_permission()], revoked_at: revoked_date_time(), secret: secret(), updated_at: Aura.Model.Common.updated_at(), url: Aura.Model.Common.url() }
Type describing an API key coming from a Hex-compliant API.
Keys
- name ::
Aura.Common.api_key_name/0
- permissions :: [
Aura.Model.HexAPIKey.api_permission/0
] - url ::
Aura.Model.Common.url/0
- secret ::
Aura.Model.HexAPIKey.secret/0
- inserted_at ::
Aura.Model.Common.inserted_at/0
- updated_at ::
Aura.Model.Common.updated_at/0
- authing_key ::
Aura.Model.HexAPIKey.authing_key/0
- revoked_at ::
Aura.Model.HexAPIKey.revoked_date_time/0
Examples
%Aura.Model.HexAPIKey{
authing_key: false,
secret: "3321e19a16017725ced9fe56a0071aa6",
inserted_at: ~U[2025-06-02 04:26:33.915977Z],
name: "veniam.ut",
permissions: [
%{domain: "api", resource: "read"},
%{domain: "api", resource: "write"}
],
revoked_at: nil,
updated_at: ~U[2025-06-02 04:26:33.915977Z],
url: "http://localhost:4000/api/keys/veniam.ut"
}
See Also
Functions
Builds a HexAPIKey
from a map
Parameters
Parameter | Description |
---|---|
m | A map to build into a Aura.Model.HexAPIKey.t/0 |