MCPcopy
hub / github.com/pocketbase/pocketbase / FetchRawUserInfo

Method FetchRawUserInfo

tools/auth/monday.go:99–110  ·  view source on GitHub ↗

FetchRawUserInfo implements Provider.FetchRawUserInfo interface. monday.com doesn't have a UserInfo endpoint and information on the user is retrieved using their GraphQL API (https://developer.monday.com/api-reference/reference/me#queries)

(token *oauth2.Token)

Source from the content-addressed store, hash-verified

97// monday.com doesn't have a UserInfo endpoint and information on the user
98// is retrieved using their GraphQL API (https://developer.monday.com/api-reference/reference/me#queries)
99func (p *Monday) FetchRawUserInfo(token *oauth2.Token) ([]byte, error) {
100 query := []byte(`{"query": "query { me { id enabled name email is_verified photo_small }}"}`)
101 bodyReader := bytes.NewReader(query)
102
103 req, err := http.NewRequestWithContext(p.ctx, "POST", p.userInfoURL, bodyReader)
104 if err != nil {
105 return nil, err
106 }
107 req.Header.Set("Content-Type", "application/json")
108
109 return p.sendRawUserInfoRequest(req, token)
110}

Callers 1

FetchAuthUserMethod · 0.95

Calls 3

NewReaderMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected