2 Star 1 Fork 0

李玮 / trireme-lib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
oauthtokens.go 692 Bytes
一键复制 编辑 原始数据 按行查看 历史
李玮 提交于 2020-01-29 13:23 . v1
package common
import (
"context"
"time"
)
// ServiceTokenType is the type of the token.
type ServiceTokenType string
// Values of ServiceTokenType
const (
ServiceTokenTypeOAUTH ServiceTokenType = "oauth"
ServiceTokenTypeAWS ServiceTokenType = "aws"
)
// ServiceTokenIssuer is an interface of an implementation that can issue service tokens on behalf
// of a PU. The user of the library must provide the implementation. ServiceTokens can be OAUTH
// tokens or cloud provider specific tokens such AWS Role credentials.
type ServiceTokenIssuer interface {
Issue(ctx context.Context, contextID string, stype ServiceTokenType, audience string, validity time.Duration) (string, error)
}
1
https://gitee.com/emmoblin/trireme-lib.git
git@gitee.com:emmoblin/trireme-lib.git
emmoblin
trireme-lib
trireme-lib
7726874a2b9a

搜索帮助

53164aa7 5694891 3bd8fe86 5694891