diff --git a/middleware.go b/middleware.go index e90d95c..8c6d5ca 100644 --- a/middleware.go +++ b/middleware.go @@ -252,10 +252,10 @@ func Session(cfg Options) func(next http.Handler) http.Handler { sessionType = max(sessionType, proto.SessionType_AccessKey) ctx = WithAccessKey(ctx, accessKey) - // TODO: - // projectID, _ = proto.GetProjectID(accessKey) - // ctx = withProjectIDy(ctx, projectID) - // httplog.SetAttrs(ctx, slog.Uint64("projectId", projectID)) + + projectID, _ = GetProjectIDFromAccessKey(accessKey) + ctx = withProjectID(ctx, projectID) + httplog.SetAttrs(ctx, slog.Uint64("projectId", projectID)) break } } diff --git a/proto/proto.go b/proto/proto.go index 40371af..50df7ed 100644 --- a/proto/proto.go +++ b/proto/proto.go @@ -12,7 +12,3 @@ func (s SessionType) OrHigher() []SessionType { } return list } - -// Deprecated: Use SessionType_S2S instead. -// Note: Remove this after some time. -const SessionType_InternalService = SessionType_S2S