Skip to content

Support for access token authorization#280

Closed
pleasant-menlo wants to merge 3 commits intoIMAP-Science-Operations-Center:mainfrom
pleasant-menlo:main
Closed

Support for access token authorization#280
pleasant-menlo wants to merge 3 commits intoIMAP-Science-Operations-Center:mainfrom
pleasant-menlo:main

Conversation

@pleasant-menlo
Copy link
Contributor

Added support for using an access token for authorization when making requests.

-Giovanni and George

@pleasant-menlo pleasant-menlo marked this pull request as draft October 8, 2025 18:59
@pleasant-menlo pleasant-menlo marked this pull request as ready for review October 8, 2025 18:59
Comment on lines +162 to +176
1. Make a POST request to: `https://lasp-auth.colorado.edu/auth/realms/lasp/protocol` with the request Content-Type as `x-www-form-urlencoded` and body:
```
client_id: imap-sdc
grant_type: password
username: {{Your LASP galaxy username}}
password: {{Your LASP galaxy password}}
```

2. This should return a JSON response that contains an access token that is valid for 5 minutes. It will also contain a longer-lived refresh token that can be used to get more access tokens with a request to the same url as above, but the following body:

```
client_id: imap-sdc
grant_type: refresh_token
refresh_token: {{Refresh Token}}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an awesome write-up! Unfortunately, I did have a request from our web team to not overly publicize the token endpoints. Could we move this content into the Confluence Galaxy somewhere? I don't know where a good spot is... there was a recent "manuals heading" for releases here https://lasp.colorado.edu/galaxy/spaces/IMAP/pages/292754433/Manuals

refresh_token: {{Refresh Token}}
```

To use an access token with imap-data-access you can set the following environment variables:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this section, I think this is the important piece for users.

Suggested change
To use an access token with imap-data-access you can set the following environment variables:
To use an access token with imap-data-access you can set the following environment variables (note the `/authorized` trailing path):

@greglucas greglucas mentioned this pull request Oct 15, 2025
@greglucas
Copy link
Contributor

These commits and the other documentation fix I pushed were merged in #280, so this should be taken care of now.

@greglucas greglucas closed this Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants