feat(auth): Make token auth default (#6305)
**What** - make token auth the default being returned from authentication endpoints in api-v2 - Add `auth/session` to convert token to session based auth - add regex-scopes to authenticate middleware Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
This commit is contained in:
co-authored by
Sebastian Rindom
parent
96ba49329b
commit
e2738ab91d
@@ -34,6 +34,7 @@ export * from "./remove-nullisih"
|
||||
export * from "./selector-constraints-to-string"
|
||||
export * from "./set-metadata"
|
||||
export * from "./simple-hash"
|
||||
export * from "./string-or-regex-equals"
|
||||
export * from "./string-to-select-relation-object"
|
||||
export * from "./stringify-circular"
|
||||
export * from "./to-camel-case"
|
||||
@@ -42,4 +43,3 @@ export * from "./to-pascal-case"
|
||||
export * from "./transaction"
|
||||
export * from "./upper-case-first"
|
||||
export * from "./wrap-handler"
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export const stringEqualsOrRegexMatch = (
|
||||
stringOrRegex: string | RegExp,
|
||||
testString: string
|
||||
) => {
|
||||
if (stringOrRegex instanceof RegExp) {
|
||||
return stringOrRegex.test(testString)
|
||||
}
|
||||
return stringOrRegex === testString
|
||||
}
|
||||
Reference in New Issue
Block a user