Files
threshold-ui/ui/admin/app/controllers/scopes/scope/authenticate/method/oidc.js
T
55e1e68f30 [COMPLIANCE] Update Copyright and License Headers (#3099)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Dharini <dharini@hashicorp.com>
2026-01-20 11:35:10 -05:00

32 lines
828 B
JavaScript

/**
* Copyright IBM Corp. 2021, 2025
* SPDX-License-Identifier: BUSL-1.1
*/
import Controller, { inject as controller } from '@ember/controller';
import { service } from '@ember/service';
import { action } from '@ember/object';
export default class ScopesScopeAuthenticateMethodOidcController extends Controller {
@controller('scopes/scope/authenticate/method/index') authenticateMethod;
// =services
@service session;
@service router;
// =actions
/**
* Retry by starting a new OIDC authentication flow.
*/
@action
async retryAuthentication() {
const scope = this.authMethod.scope;
const authenticatorName = `authenticator:${this.authMethod.type}`;
await this.authenticateMethod.startOIDCAuthentication(authenticatorName, {
scope,
authMethod: this.authMethod,
});
}
}