Documentation ¶
Index ¶
- func DeleteEncryptionKey(rlog log.Ext1FieldLogger, tx *sqlx.Tx, tokenID mtid.MTID) error
- func GetEncryptionKey(rlog log.Ext1FieldLogger, tx *sqlx.Tx, tokenID mtid.MTID, jwt string) (key []byte, rtID uint64, err error)
- func ReencryptEncryptionKey(rlog log.Ext1FieldLogger, tx *sqlx.Tx, tokenID mtid.MTID, ...) error
- type EncryptionKey
- type RTCryptKeyDBRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEncryptionKey ¶
DeleteEncryptionKey deletes the encryption key for a mytoken.
func GetEncryptionKey ¶
func GetEncryptionKey(rlog log.Ext1FieldLogger, tx *sqlx.Tx, tokenID mtid.MTID, jwt string) ( key []byte, rtID uint64, err error, )
GetEncryptionKey returns the encryption key and the rtid for a mytoken
func ReencryptEncryptionKey ¶
func ReencryptEncryptionKey(rlog log.Ext1FieldLogger, tx *sqlx.Tx, tokenID mtid.MTID, oldJWT, newJWT string) error
ReencryptEncryptionKey re-encrypts the encryption key for a mytoken. This is needed when the mytoken changes, e.g. on token rotation
Types ¶
type EncryptionKey ¶
type EncryptionKey string
EncryptionKey is a type for the encryption key stored in the db
type RTCryptKeyDBRes ¶ added in v0.4.0
type RTCryptKeyDBRes struct { KeyID uint64 `db:"key_id"` EncryptionKey EncryptionKey `db:"encryption_key"` RTID uint64 `db:"rt_id"` RT string `db:"refresh_token"` }
RTCryptKeyDBRes is a struct holding the db result for the EncryptionKeys_GetRTKeyForMT procedure
Click to show internal directories.
Click to hide internal directories.