From e495a8423f75113f7d4c5d4f57a1eca157a1548a Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 9 Dec 2024 19:32:47 -0800 Subject: [PATCH] openapi: try session_id --- openapi.yaml | 2 +- pkg/api/oas_security_gen.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 4cd86ec..e2124ca 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -557,7 +557,7 @@ components: cookieAuth: type: apiKey in: cookie - name: SESSIONID + name: session_id schemas: Id: required: diff --git a/pkg/api/oas_security_gen.go b/pkg/api/oas_security_gen.go index a9749fa..5f1eac3 100644 --- a/pkg/api/oas_security_gen.go +++ b/pkg/api/oas_security_gen.go @@ -35,7 +35,7 @@ func findAuthorization(h http.Header, prefix string) (string, bool) { func (s *Server) securityCookieAuth(ctx context.Context, operationName OperationName, req *http.Request) (context.Context, bool, error) { var t CookieAuth - const parameterName = "SESSIONID" + const parameterName = "session_id" var value string switch cookie, err := req.Cookie(parameterName); { case err == nil: // if NO error @@ -67,7 +67,7 @@ func (s *Client) securityCookieAuth(ctx context.Context, operationName Operation return errors.Wrap(err, "security source \"CookieAuth\"") } req.AddCookie(&http.Cookie{ - Name: "SESSIONID", + Name: "session_id", Value: t.APIKey, }) return nil