MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / decodeOAuthState

Function decodeOAuthState

internal/auth/auth.go:214–224  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

212}
213
214func decodeOAuthState(raw string) (*OAuthState, error) {
215 b, err := base64.URLEncoding.DecodeString(raw)
216 if err != nil {
217 return nil, fmt.Errorf("invalid oauth state encoding")
218 }
219 var s OAuthState
220 if err := json.Unmarshal(b, &s); err != nil {
221 return nil, fmt.Errorf("invalid oauth state")
222 }
223 return &s, nil
224}
225
226func (ua *UserAuth) setCookie(w http.ResponseWriter, name, value string, maxAge int) {
227 http.SetCookie(w, &http.Cookie{

Callers 1

HandleCallbackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected