mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore: remove feature guard for token exchange (#6246)
This commit is contained in:
parent
7537c510f7
commit
3205e36e32
6 changed files with 2 additions and 16 deletions
|
@ -5,7 +5,6 @@ import { useState } from 'react';
|
|||
import { useFormContext } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { isDevFeaturesEnabled } from '@/consts/env';
|
||||
import { type JwtCustomizerForm } from '@/pages/CustomizeJwtDetails/type';
|
||||
import {
|
||||
environmentVariablesCodeExample,
|
||||
|
@ -79,7 +78,7 @@ function InstructionTab({ isActive }: Props) {
|
|||
/>
|
||||
</GuideCard>
|
||||
)}
|
||||
{isDevFeaturesEnabled && tokenType === LogtoJwtTokenKeyType.AccessToken && (
|
||||
{tokenType === LogtoJwtTokenKeyType.AccessToken && (
|
||||
<GuideCard
|
||||
name={CardType.GrantData}
|
||||
isExpanded={expendCard === CardType.GrantData}
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
{
|
||||
"name": "Subject tokens",
|
||||
"description": "The subject token API provides the ability to create a new subject token for the use of impersonating the user."
|
||||
},
|
||||
{ "name": "Dev feature" }
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/api/subject-tokens": {
|
||||
|
|
|
@ -4,7 +4,6 @@ import { addSeconds } from 'date-fns';
|
|||
import { object, string } from 'zod';
|
||||
|
||||
import { subjectTokenExpiresIn, subjectTokenPrefix } from '#src/constants/index.js';
|
||||
import { EnvSet } from '#src/env-set/index.js';
|
||||
import koaGuard from '#src/middleware/koa-guard.js';
|
||||
import koaQuotaGuard from '#src/middleware/koa-quota-guard.js';
|
||||
|
||||
|
@ -24,10 +23,6 @@ export default function subjectTokenRoutes<T extends ManagementApiRouter>(
|
|||
subjectTokens: { insertSubjectToken },
|
||||
} = queries;
|
||||
|
||||
if (!EnvSet.values.isDevFeaturesEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
router.post(
|
||||
'/subject-tokens',
|
||||
koaQuotaGuard({ key: 'subjectTokenEnabled', quota }),
|
||||
|
|
|
@ -155,7 +155,6 @@ const identifiableEntityNames = Object.freeze([
|
|||
const additionalTags = Object.freeze(
|
||||
condArray<string>(
|
||||
'Organization applications',
|
||||
EnvSet.values.isDevFeaturesEnabled && 'Subject tokens',
|
||||
EnvSet.values.isDevFeaturesEnabled && 'Custom UI assets',
|
||||
'Organization users'
|
||||
)
|
||||
|
|
|
@ -22,7 +22,6 @@ import { createUserByAdmin } from '#src/helpers/index.js';
|
|||
import { OrganizationApiTest } from '#src/helpers/organization.js';
|
||||
import { enableAllPasswordSignInMethods } from '#src/helpers/sign-in-experience.js';
|
||||
import {
|
||||
devFeatureTest,
|
||||
getAccessTokenPayload,
|
||||
randomString,
|
||||
generateName,
|
||||
|
@ -30,8 +29,6 @@ import {
|
|||
generateUsername,
|
||||
} from '#src/utils.js';
|
||||
|
||||
const { describe, it } = devFeatureTest;
|
||||
|
||||
describe('Token Exchange', () => {
|
||||
const username = generateUsername();
|
||||
const password = generatePassword();
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import { createSubjectToken } from '#src/api/subject-token.js';
|
||||
import { createUserByAdmin } from '#src/helpers/index.js';
|
||||
import { devFeatureTest } from '#src/utils.js';
|
||||
|
||||
const { describe, it } = devFeatureTest;
|
||||
|
||||
describe('subject-tokens', () => {
|
||||
it('should create a subject token successfully', async () => {
|
||||
|
|
Loading…
Reference in a new issue