Skip to content

Fetch the ID Token from the Authorization Server#1

Merged
radiantshaw merged 1 commit intodevelopfrom
feature/token-response
Jan 18, 2026
Merged

Fetch the ID Token from the Authorization Server#1
radiantshaw merged 1 commit intodevelopfrom
feature/token-response

Conversation

@radiantshaw
Copy link
Owner

@radiantshaw radiantshaw commented Jan 17, 2026

  • ::Vauth::AuthCodeGrant - gives you an object that can make the request to the Authorization Server and fetch the ID Token
  • ::Vauth::IdentityToken - responsible for decoding the JWT and proving you with the issuer and subject information
  • ::Vauth::Client - holds the information needed to make the request

Added some RuboCop rules. Removed an unnecessary failing spec. Added the binstub for Rake. Installed some necessary gems.

@radiantshaw radiantshaw self-assigned this Jan 17, 2026
Added the ability to fetch the ID Token via the Authorization Code
Grant. The class responsible for doing the fetching is
`::Vauth::AuthCodeGrant`. It returns a `::Vauth::IdentityToken` via its
`#identity_token` method. `::Vauth::AuthCodeGrant` currently only has
the ability to deal with the ID Token, as I'm only focusing on Open ID
Connect for now. In the future, it should also have a method to fetch
the Access Token.

The `::Vauth::Client` struct holds the information that allows the grant
object to make the request. Currently, I'm not sure if there's a better
way to encapsulate the information handled via the `::Vauth::Client`
class, but its refactor is on my mind if I find a better way.

Other notable changes are related to RuboCop. I didn't like the
defaults, so I changed it to my liking. The end goal is to collect all
these and extract a gem out of it.

Installed the `debug` gem as well for obvious reasons. It also created a
`Gemfile.lock` that wasn't present earlier for some reason.

Installed the `jwt` gem as well to decode the ID Token received from the
OAuth2 Provider.

Generated the binstub for Rake to make it easier to run the tests as
well as RuboCop.

Also had to remove a spec that was failing. It was just an example spec.
@radiantshaw radiantshaw force-pushed the feature/token-response branch from 2f8dd7e to 214bf12 Compare January 18, 2026 07:36
@radiantshaw radiantshaw changed the title Fetch the ID Token using the Authorization Code Grant Fetch the ID Token from the Authorization Server Jan 18, 2026
@radiantshaw radiantshaw marked this pull request as ready for review January 18, 2026 08:24
@radiantshaw radiantshaw merged commit e83ec64 into develop Jan 18, 2026
1 check passed
@radiantshaw radiantshaw deleted the feature/token-response branch January 18, 2026 08:27
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.

1 participant