providers/oauth2: show id_token issues for refresh token
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -1,19 +1,26 @@
|
||||
import { t } from "@lingui/macro";
|
||||
import { customElement, html, property, TemplateResult } from "lit-element";
|
||||
import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
|
||||
import { AKResponse } from "../../api/Client";
|
||||
import { Table, TableColumn } from "../table/Table";
|
||||
import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css";
|
||||
|
||||
import "../forms/DeleteForm";
|
||||
import { PAGE_SIZE } from "../../constants";
|
||||
import { ExpiringBaseGrantModel, Oauth2Api } from "authentik-api";
|
||||
import { RefreshTokenModel, Oauth2Api } from "authentik-api";
|
||||
import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
|
||||
@customElement("ak-user-oauth-refresh-list")
|
||||
export class UserOAuthRefreshList extends Table<ExpiringBaseGrantModel> {
|
||||
export class UserOAuthRefreshList extends Table<RefreshTokenModel> {
|
||||
expandable = true;
|
||||
|
||||
@property({ type: Number })
|
||||
userId?: number;
|
||||
|
||||
apiEndpoint(page: number): Promise<AKResponse<ExpiringBaseGrantModel>> {
|
||||
static get styles(): CSSResult[] {
|
||||
return super.styles.concat(PFFlex);
|
||||
}
|
||||
|
||||
apiEndpoint(page: number): Promise<AKResponse<RefreshTokenModel>> {
|
||||
return new Oauth2Api(DEFAULT_CONFIG).oauth2RefreshTokensList({
|
||||
user: this.userId,
|
||||
ordering: "expires",
|
||||
@ -33,7 +40,24 @@ export class UserOAuthRefreshList extends Table<ExpiringBaseGrantModel> {
|
||||
];
|
||||
}
|
||||
|
||||
row(item: ExpiringBaseGrantModel): TemplateResult[] {
|
||||
renderExpanded(item: RefreshTokenModel): TemplateResult {
|
||||
return html`
|
||||
<td role="cell" colspan="4">
|
||||
<div class="pf-c-table__expandable-row-content">
|
||||
<div class="pf-l-flex">
|
||||
<div class="pf-l-flex__item">
|
||||
<h3>${t`ID Token`}</h3>
|
||||
<pre>${item.idToken}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>`;
|
||||
}
|
||||
|
||||
row(item: RefreshTokenModel): TemplateResult[] {
|
||||
return [
|
||||
html`<a href="#/core/providers/${item.provider?.pk}">
|
||||
${item.provider?.name}
|
||||
|
||||
Reference in New Issue
Block a user