Add TokenFormat to application.

This commit is contained in:
Gucheng Wang
2021-12-18 16:16:34 +08:00
parent cb625b3fa2
commit 95f2a3b311
4 changed files with 19 additions and 0 deletions

View File

@ -238,6 +238,19 @@ class ApplicationEditPage extends React.Component {
/>
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("application:Token format"), i18next.t("general:Token format - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} value={this.state.application.tokenFormat} onChange={(value => {this.updateApplicationField('tokenFormat', value);})}>
{
['JWT', 'JWT-Empty']
.map((item, index) => <Option key={index} value={item}>{item}</Option>)
}
</Select>
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Token expire"), i18next.t("general:Token expire - Tooltip"))} :

View File

@ -70,6 +70,7 @@ class ApplicationListPage extends React.Component {
{name: "Agreement", visible: true, required: true, rule: "None"},
],
redirectUris: ["http://localhost:9000/callback"],
tokenFormat: "JWT",
expireInHours: 24 * 7,
}
}