mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 08:50:42 +02:00
mcp: token: handle authorization_code (pt2) (#5589)
This commit is contained in:
parent
7b9c392531
commit
0602f5e00d
5 changed files with 240 additions and 16 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue