mcp: token: handle authorization_code (pt2) (#5589)

This commit is contained in:
Denis Mishin 2025-04-28 14:37:19 -04:00 committed by GitHub
parent 7b9c392531
commit 0602f5e00d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 240 additions and 16 deletions

View file

@ -1,9 +1,11 @@
package mcp
import (
"crypto/cipher"
"fmt"
"github.com/pomerium/pomerium/internal/oauth21"
"github.com/pomerium/pomerium/pkg/grpc/session"
)
func CheckPKCE(
@ -25,3 +27,7 @@ func CheckPKCE(
return nil
}
func CreateAccessToken(src *session.Session, cipher cipher.AEAD) (string, error) {
return CreateCode(CodeTypeAccess, src.Id, src.ExpiresAt.AsTime(), "", cipher)
}