2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2024-05-31 11:29:24 -07:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-01 09:39:41 -06:00
|
|
|
*/
|
|
|
|
|
|
2020-07-24 17:05:55 -04:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
|
|
|
|
|
|
export default class ScopesScopeAuthenticateMethodRoute extends Route {
|
|
|
|
|
// =services
|
|
|
|
|
|
2022-11-07 15:17:23 -08:00
|
|
|
@service store;
|
2020-07-24 17:05:55 -04:00
|
|
|
|
|
|
|
|
// =methods
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns an auth method by id.
|
|
|
|
|
* @param {object} params
|
|
|
|
|
* @return {Promise{AuthMethodModel}}
|
|
|
|
|
*/
|
|
|
|
|
model({ auth_method_id: id }) {
|
|
|
|
|
const adapterOptions = { scopeID: this.modelFor('scopes.scope').id };
|
2021-04-14 15:13:39 -04:00
|
|
|
return this.store.peekRecord('auth-method', id, adapterOptions);
|
2020-07-24 17:05:55 -04:00
|
|
|
}
|
|
|
|
|
}
|