**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>
10 lines
231 B
TypeScript
10 lines
231 B
TypeScript
export const stringEqualsOrRegexMatch = (
|
|
stringOrRegex: string | RegExp,
|
|
testString: string
|
|
) => {
|
|
if (stringOrRegex instanceof RegExp) {
|
|
return stringOrRegex.test(testString)
|
|
}
|
|
return stringOrRegex === testString
|
|
}
|