MCPcopy Index your code
hub / github.com/writefreely/writefreely / buildLoginURL

Method buildLoginURL

oauth_gitlab.go:40–53  ·  view source on GitHub ↗
(state string)

Source from the content-addressed store, hash-verified

38}
39
40func (c gitlabOauthClient) buildLoginURL(state string) (string, error) {
41 u, err := url.Parse(c.AuthLocation)
42 if err != nil {
43 return "", err
44 }
45 q := u.Query()
46 q.Set("client_id", c.ClientID)
47 q.Set("redirect_uri", c.CallbackLocation)
48 q.Set("response_type", "code")
49 q.Set("state", state)
50 q.Set("scope", "read_user")
51 u.RawQuery = q.Encode()
52 return u.String(), nil
53}
54
55func (c gitlabOauthClient) exchangeOauthCode(ctx context.Context, code string) (*TokenResponse, error) {
56 form := url.Values{}

Callers

nothing calls this directly

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected