Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I rewrote the get-auth-map function to use Google REST API (instead of Java interop) and added a new type for AuthMap, which is returned by that function now. This also converts the json returned by google with keys like "access_token" to a proper clojure map with the key :access-token, which is what is expected in GoogleCtx. I'm using HTTPkit to send the requests and clojure.data.json to parse the json response. HTTPkit can easily be replaced by whatever other library you'd prefer to send HTTP requests, but it works pretty well.
Furthermore, I added a function to refresh an existing google token, which also returns an AuthMap containing the new token.
Users can also specify their own redirect-url, instead of always using copy paste, this enables you to have google send the auth-code directly to your web app. Consequently, you may also now specify your access-type as "online" or "offline". Both values are read from the google-context, defaulting to the previous functionality if none are given.
PS: Sorry for the messy commits, I worked on the master branch and then merged to develop. If you want you can also merge the master branch directly.