2024-06-29 05:43:49 +00:00
|
|
|
#!/usr/bin/sh
|
|
|
|
oauth2c \
|
|
|
|
--client-id $OAUTH2_ID \
|
|
|
|
--client-secret $OAUTH2_SECRET \
|
|
|
|
--grant-type authorization_code \
|
|
|
|
--redirect-url "https://localhost:9876/callback" \
|
|
|
|
--scopes "read_prefs,write_api" \
|
|
|
|
--callback-tls-cert "$(pwd)/tmp/domain.crt" \
|
|
|
|
--callback-tls-key "$(pwd)/tmp/domain.key" \
|
|
|
|
--auth-method "client_secret_basic" \
|
|
|
|
--response-types "code" --response-mode "query" \
|
2024-07-04 17:27:24 +00:00
|
|
|
"https://api.openstreetmap.org" \
|
2024-06-29 11:27:25 +00:00
|
|
|
| jq '{ osm_session: . }' > session.json
|
2024-07-04 17:27:24 +00:00
|
|
|
|
|
|
|
# at the end
|
|
|
|
# cp session.json ~/.local/share/bobosm/session.json
|