mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-18 05:47:32 +00:00
4e1e8a714a
* fix: dont (re)generate client secret with auth type none * fix(cors): allow Origin from request * feat: add origin allow list and fix some core issues * rename migration * fix UserIDsByDomain * check origin on userinfo * update oidc pkg
23 lines
554 B
Go
23 lines
554 B
Go
package grpc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
|
|
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
|
|
|
"github.com/caos/zitadel/internal/api/http"
|
|
)
|
|
|
|
func GetHeader(ctx context.Context, headername string) string {
|
|
return metautils.ExtractIncoming(ctx).Get(headername)
|
|
}
|
|
|
|
func GetGatewayHeader(ctx context.Context, headername string) string {
|
|
return GetHeader(ctx, runtime.MetadataPrefix+headername)
|
|
}
|
|
|
|
func GetAuthorizationHeader(ctx context.Context) string {
|
|
return GetHeader(ctx, http.Authorization)
|
|
}
|