mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-01 18:33:19 +02:00
mcp: authorize request (pt2) (#5586)
This commit is contained in:
parent
63ccf6ab93
commit
9e4947c62f
9 changed files with 567 additions and 6 deletions
|
@ -2,6 +2,7 @@ package mcp
|
|||
|
||||
import (
|
||||
"context"
|
||||
"crypto/cipher"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path"
|
||||
|
@ -32,6 +33,7 @@ type Handler struct {
|
|||
prefix string
|
||||
trace oteltrace.TracerProvider
|
||||
storage *Storage
|
||||
cipher cipher.AEAD
|
||||
}
|
||||
|
||||
func New(
|
||||
|
@ -46,10 +48,16 @@ func New(
|
|||
return nil, fmt.Errorf("databroker client: %w", err)
|
||||
}
|
||||
|
||||
cipher, err := getCipher(cfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get cipher: %w", err)
|
||||
}
|
||||
|
||||
return &Handler{
|
||||
prefix: prefix,
|
||||
trace: tracerProvider,
|
||||
storage: NewStorage(client),
|
||||
cipher: cipher,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue