Skip to content

Commit

Permalink
fix: make GenerateJWTProfileToken public (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
livio-a authored Feb 3, 2021
1 parent ba01bdf commit fa92a20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rp/tockenexchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ func JWTProfileExchange(ctx context.Context, jwtProfileRequest *tokenexchange.JW

//JWTProfileExchange handles the oauth2 jwt profile exchange
func JWTProfileAssertionExchange(ctx context.Context, assertion *oidc.JWTProfileAssertion, scopes oidc.Scopes, rp RelayingParty) (*oauth2.Token, error) {
token, err := generateJWTProfileToken(assertion)
token, err := GenerateJWTProfileToken(assertion)
if err != nil {
return nil, err
}
return JWTProfileExchange(ctx, tokenexchange.NewJWTProfileRequest(token, scopes...), rp)
}

func generateJWTProfileToken(assertion *oidc.JWTProfileAssertion) (string, error) {
func GenerateJWTProfileToken(assertion *oidc.JWTProfileAssertion) (string, error) {
privateKey, err := bytesToPrivateKey(assertion.PrivateKey)
if err != nil {
return "", err
Expand Down

0 comments on commit fa92a20

Please sign in to comment.