Skip to content

Commit

Permalink
fix: unit
Browse files Browse the repository at this point in the history
Signed-off-by: Mykhailo Sizov <[email protected]>
  • Loading branch information
mishasizov-SK committed Feb 19, 2024
1 parent c058a74 commit a4634b7
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 110 deletions.
5 changes: 4 additions & 1 deletion pkg/openid4ci/interaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ func (i *interaction) requestAccessToken(redirectURIWithAuthCode string) error {

authTokenResponse, err := i.oAuth2Config.Exchange(ctx, parsedURI.Query().Get("code"),
oauth2.SetAuthURLParam("code_verifier", i.codeVerifier))
if err != nil {
return err
}

i.authToken = &universalAuthToken{
AccessToken: authTokenResponse.AccessToken,
Expand All @@ -256,7 +259,7 @@ func (i *interaction) requestAccessToken(redirectURIWithAuthCode string) error {

i.authTokenResponseNonce = authTokenResponse.Extra("c_nonce")

return err
return nil
}

func (i *interaction) getTokenEndpoint() (string, error) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/openid4ci/issuerinitiatedinteraction.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ func NewIssuerInitiatedInteraction(
httpClient: config.HTTPClient,
}

if err := issuerInteraction.populateIssuerMetadata(getIssuerMetadataEventText); err != nil {
err = issuerInteraction.populateIssuerMetadata(getIssuerMetadataEventText)
if err != nil {
return nil, err
}

Expand Down
Loading

0 comments on commit a4634b7

Please sign in to comment.