-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: reduce size of verifiers (#3857)"
This reverts commit 0cd00dc.
- Loading branch information
Showing
24 changed files
with
811 additions
and
839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright © 2023 Ory Corp | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package flowctx | ||
|
||
import "github.com/ory/hydra/v2/client" | ||
|
||
type ( | ||
CookieSuffixer interface { | ||
CookieSuffix() string | ||
} | ||
|
||
StaticSuffix string | ||
clientID string | ||
) | ||
|
||
func (s StaticSuffix) CookieSuffix() string { return string(s) } | ||
func (s clientID) GetID() string { return string(s) } | ||
|
||
const ( | ||
loginSessionCookie = "ory_hydra_loginsession" | ||
) | ||
|
||
func LoginSessionCookie(suffix CookieSuffixer) string { | ||
return loginSessionCookie + "_" + suffix.CookieSuffix() | ||
} | ||
|
||
func SuffixForClient(c client.IDer) StaticSuffix { | ||
return StaticSuffix(client.CookieSuffix(c)) | ||
} | ||
|
||
func SuffixFromStatic(id string) StaticSuffix { | ||
return SuffixForClient(clientID(id)) | ||
} |
Oops, something went wrong.