finish the RP and example

This commit is contained in:
Tim Möhlmann 2023-08-28 11:28:16 +03:00
parent dd9d8f2870
commit 4005cb9a38
9 changed files with 114 additions and 11 deletions

17
pkg/client/rp/log.go Normal file
View file

@ -0,0 +1,17 @@
package rp
import (
"context"
"github.com/zitadel/logging"
"golang.org/x/exp/slog"
)
func logCtxWithRPData(ctx context.Context, rp RelyingParty, attrs ...any) context.Context {
logger, ok := rp.Logger(ctx)
if !ok {
return ctx
}
logger = logger.With(slog.Group("rp", attrs...))
return logging.ToContext(ctx, logger)
}