fix: make GenerateJWTProfileToken public (#82)
This commit is contained in:
parent
ba01bdf1ef
commit
fa92a20615
1 changed files with 2 additions and 2 deletions
|
@ -49,14 +49,14 @@ func JWTProfileExchange(ctx context.Context, jwtProfileRequest *tokenexchange.JW
|
||||||
|
|
||||||
//JWTProfileExchange handles the oauth2 jwt profile exchange
|
//JWTProfileExchange handles the oauth2 jwt profile exchange
|
||||||
func JWTProfileAssertionExchange(ctx context.Context, assertion *oidc.JWTProfileAssertion, scopes oidc.Scopes, rp RelayingParty) (*oauth2.Token, error) {
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return JWTProfileExchange(ctx, tokenexchange.NewJWTProfileRequest(token, scopes...), rp)
|
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)
|
privateKey, err := bytesToPrivateKey(assertion.PrivateKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue