mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 18:53:29 +00:00
* refactored api key modal for multiple key types * Added support for viewing and rotating user API keys * Fixed the API key component references in app.module * Implemented User ApiKey viewing/rotating * Changed ApiKey grant_type display to client_credentials * Hopefully put jslib back * Added new localization strings for user API keys * Toggled button text based on if viewing or rotating an api key * updated jslib * Reverted jslib * Trying to fix jslib * Reverted jslib from commit hash * Reupdated jslib
49 lines
2.5 KiB
HTML
49 lines
2.5 KiB
HTML
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="apiKeyTitle">
|
|
<div class="modal-dialog" role="document">
|
|
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
|
<div class="modal-header">
|
|
<h2 class="modal-title" id="apiKeyTitle">{{apiKeyTitle | i18n}}</h2>
|
|
<button type="button" class="close" data-dismiss="modal" appA11yTitle="{{'close' | i18n}}">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>{{apiKeyDescription | i18n}}</p>
|
|
<ng-container *ngIf="!clientSecret">
|
|
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
|
<input id="masterPassword" type="password" name="MasterPasswordHash" class="form-control"
|
|
[(ngModel)]="masterPassword" required appAutofocus appInputVerbatim>
|
|
</ng-container>
|
|
<app-callout type="warning" *ngIf="clientSecret">{{apiKeyWarning | i18n}}</app-callout>
|
|
<app-callout type="info" title="{{'oauth2ClientCredentials' | i18n}}" icon="fa-key"
|
|
*ngIf="clientSecret">
|
|
<p class="mb-1">
|
|
<strong>client_id:</strong><br>
|
|
<code>{{clientId}}</code>
|
|
</p>
|
|
<p class="mb-1">
|
|
<strong>client_secret:</strong><br>
|
|
<code>{{clientSecret}}</code>
|
|
</p>
|
|
<p class="mb-1">
|
|
<strong>scope:</strong><br>
|
|
<code>{{scope}}</code>
|
|
</p>
|
|
<p class="mb-0">
|
|
<strong>grant_type:</strong><br>
|
|
<code>{{grantType}}</code>
|
|
</p>
|
|
</app-callout>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading"
|
|
*ngIf="!clientSecret">
|
|
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
|
<span>{{(isRotation ? 'rotateApiKey' : 'viewApiKey') | i18n}}</span>
|
|
</button>
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{'close' | i18n}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|