MCPcopy Create free account
hub / github.com/gogs/gogs / GetAccessTokenBySHA1

Method GetAccessTokenBySHA1

internal/context/auth.go:109–109  ·  view source on GitHub ↗

GetAccessTokenBySHA1 returns the access token with given SHA1. It returns database.ErrAccessTokenNotExist when not found.

(ctx context.Context, sha1 string)

Source from the content-addressed store, hash-verified

107 // GetAccessTokenBySHA1 returns the access token with given SHA1. It returns
108 // database.ErrAccessTokenNotExist when not found.
109 GetAccessTokenBySHA1(ctx context.Context, sha1 string) (*database.AccessToken, error)
110 // TouchAccessTokenByID updates the updated time of the given access token to
111 // the current time.
112 TouchAccessTokenByID(ctx context.Context, id int64) error

Callers 2

authenticatedUserIDFunction · 0.65
AuthenticateByTokenFunction · 0.65

Implementers 4

storeinternal/context/store.go
MockStoreinternal/route/lfs/mocks_test.go
storeinternal/route/lfs/store.go
storeinternal/route/repo/store.go

Calls

no outgoing calls

Tested by

no test coverage detected