MCPcopy Create free account
hub / github.com/PatchMon/PatchMon / GetByOidcSub

Method GetByOidcSub

server-source-code/internal/store/users.go:101–109  ·  view source on GitHub ↗

GetByOidcSub returns a user by OIDC subject.

(ctx context.Context, oidcSub string)

Source from the content-addressed store, hash-verified

99
100// GetByOidcSub returns a user by OIDC subject.
101func (s *UsersStore) GetByOidcSub(ctx context.Context, oidcSub string) (*models.User, error) {
102 d := s.db.DB(ctx)
103 u, err := d.Queries.GetUserByOidcSub(ctx, &oidcSub)
104 if err != nil {
105 return nil, err
106 }
107 out := dbUserToModel(u)
108 return &out, nil
109}
110
111// GetByOidcSubOrEmail returns a user by OIDC subject or email (prefers oidc_sub match).
112func (s *UsersStore) GetByOidcSubOrEmail(ctx context.Context, oidcSub, email string) (*models.User, error) {

Callers 1

CallbackMethod · 0.80

Calls 3

dbUserToModelFunction · 0.85
DBMethod · 0.65
GetUserByOidcSubMethod · 0.65

Tested by

no test coverage detected