Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support token based authentication instead of password. #311

Closed
dblodgett-usgs opened this issue Oct 11, 2023 · 4 comments · Fixed by #314
Closed

Support token based authentication instead of password. #311

dblodgett-usgs opened this issue Oct 11, 2023 · 4 comments · Fixed by #314
Assignees

Comments

@dblodgett-usgs
Copy link
Collaborator

As implemented here: https://github.com/DOI-USGS/sciencebasepy/tree/kc_auth we need to support keycloak based authentication.

@dblodgett-usgs dblodgett-usgs self-assigned this Oct 11, 2023
@dblodgett-usgs
Copy link
Collaborator Author

I've verified that we can do this:

sbtools::set_endpoint("production")

authenticate_sb("[email protected]")

token <- sbtools:::pkg.env$keycloak_token

token <- token[names(token) %in% c("access_token", "refresh_token")]

token <- jsonlite::toJSON(token)

sbtools:::initialize_keycloack_env(token)

Struggling to test this out on beta sciencebase for some reason.

@jsheflin
Copy link

jsheflin commented Oct 26, 2023 via email

@dblodgett-usgs
Copy link
Collaborator Author

This was last night. I have a lead that the token I get from beta is actually bound to a different keycloak client id than the one I create with authenticate_sb(). I still need to test that out though.

@dblodgett-usgs
Copy link
Collaborator Author

This is done in in #314 -- there's plenty more to clean up, but the basics are all in place.

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 a pull request may close this issue.

2 participants