MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / Store

Method Store

server-source-code/internal/store/oidc_session.go:37–48  ·  view source on GitHub ↗

Store saves OIDC session data for the given state.

(ctx context.Context, state string, data *OidcSessionData, ttl time.Duration)

Source from the content-addressed store, hash-verified

35
36// Store saves OIDC session data for the given state.
37func (s *OidcSessionStore) Store(ctx context.Context, state string, data *OidcSessionData, ttl time.Duration) error {
38 rdb := s.rdb.RDB(ctx)
39 if rdb == nil {
40 return redis.Nil
41 }
42 key := hostctx.TenantKey(ctx, oidcSessionPrefix+state)
43 b, err := json.Marshal(data)
44 if err != nil {
45 return err
46 }
47 return rdb.Set(ctx, key, b, ttl).Err()
48}
49
50// GetAndDelete retrieves and deletes OIDC session data for the given state.
51func (s *OidcSessionStore) GetAndDelete(ctx context.Context, state string) (*OidcSessionData, error) {

Callers 7

runServiceLoopFunction · 0.45
runPatchFunction · 0.45
touchActivityMethod · 0.45
LoginMethod · 0.45
LoginMethod · 0.45
LinkMethod · 0.45

Calls 2

RDBMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected