Documentation ¶
Index ¶
- func CheckTokenRevoked(tx *sqlx.Tx, id mtid.MTID, seqno uint64, rot *api.Rotation) (bool, error)
- func GetMTParentID(myID mtid.MTID) (string, bool, error)
- func GetMTRootID(id mtid.MTID) (mtid.MTID, bool, error)
- func GetTokenUsagesAT(tx *sqlx.Tx, myID mtid.MTID, restrictionHash string) (usages *int64, err error)
- func GetTokenUsagesOther(tx *sqlx.Tx, myID mtid.MTID, restrictionHash string) (usages *int64, err error)
- func IncreaseTokenUsageAT(tx *sqlx.Tx, myID mtid.MTID, jsonRestriction []byte) error
- func IncreaseTokenUsageOther(tx *sqlx.Tx, myID mtid.MTID, jsonRestriction []byte) error
- func ParseError(err error) (bool, error)
- func RevokeMT(tx *sqlx.Tx, id mtid.MTID, recursive bool) error
- func UpdateSeqNo(tx *sqlx.Tx, id mtid.MTID, seqno uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTokenRevoked ¶
CheckTokenRevoked checks if a Mytoken has been revoked. If it is a rotating mytoken and auto_revoke is enabled for this token, it might get triggered.
func GetMTParentID ¶
GetMTParentID returns the id of the parent mytoken of the passed mytoken id
func GetMTRootID ¶
GetMTRootID returns the id of the root mytoken of the passed mytoken id
func GetTokenUsagesAT ¶
func GetTokenUsagesAT(tx *sqlx.Tx, myID mtid.MTID, restrictionHash string) (usages *int64, err error)
GetTokenUsagesAT returns how often a Mytoken was used with a specific restriction to obtain an access token
func GetTokenUsagesOther ¶
func GetTokenUsagesOther(tx *sqlx.Tx, myID mtid.MTID, restrictionHash string) (usages *int64, err error)
GetTokenUsagesOther returns how often a Mytoken was used with a specific restriction to do something else than obtaining an access token
func IncreaseTokenUsageAT ¶
IncreaseTokenUsageAT increases the usage count for obtaining ATs with a Mytoken and the given restriction
func IncreaseTokenUsageOther ¶
IncreaseTokenUsageOther increases the usage count for other usages with a Mytoken and the given restriction
func ParseError ¶
ParseError parses the passed error for a sql.ErrNoRows
Types ¶
This section is empty.