encodeState builds the OAuth state param out of our nonce and original application redirect
(nonce string, redirect string, encode bool)
| 1280 | // encodeState builds the OAuth state param out of our nonce and |
| 1281 | // original application redirect |
| 1282 | func encodeState(nonce string, redirect string, encode bool) string { |
| 1283 | rawString := fmt.Sprintf("%v:%v", nonce, redirect) |
| 1284 | if encode { |
| 1285 | return base64.RawURLEncoding.EncodeToString([]byte(rawString)) |
| 1286 | } |
| 1287 | return rawString |
| 1288 | } |
| 1289 | |
| 1290 | // decodeState splits the reflected OAuth state response back into |
| 1291 | // the nonce and original application redirect |
no outgoing calls