MCPcopy Create free account
hub / github.com/git-bug/git-bug / NewTokenFromConfig

Function NewTokenFromConfig

bridge/core/auth/token.go:30–40  ·  view source on GitHub ↗
(conf map[string]string)

Source from the content-addressed store, hash-verified

28}
29
30func NewTokenFromConfig(conf map[string]string) (*Token, error) {
31 base, err := newCredentialBaseFromData(conf)
32 if err != nil {
33 return nil, err
34 }
35
36 return &Token{
37 credentialBase: base,
38 Value: conf[keyringKeyTokenValue],
39 }, nil
40}
41
42func (t *Token) ID() entity.Id {
43 h := sha256.New()

Callers 1

decodeFunction · 0.85

Calls 1

Tested by

no test coverage detected