Hamid Ghaf e55c18ed12
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

17 lines
441 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import NamedPathAdapter from '../named-path';
export default class OidcKeyAdapter extends NamedPathAdapter {
pathForType() {
return 'identity/oidc/key';
}
rotate(name, verification_ttl) {
const data = verification_ttl ? { verification_ttl } : {};
return this.ajax(`${this.urlForUpdateRecord(name, 'oidc/key')}/rotate`, 'POST', { data });
}
}