Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

139 lines
5.0 KiB

<div class="card">
<div class="card-header">
<div class="row no-gutters">
<div class="col col-name">
<sqx-editable-title
[name]="client.name"
(nameChange)="rename($event)"
[disabled]="!client.canUpdate">
</sqx-editable-title>
</div>
<div class="col-auto">
<button type="button" class="btn btn-primary" (click)="connect()">Connect</button>
</div>
<div class="col-auto cell-actions no-padding">
<button type="button" class="btn btn-text-danger"
[disabled]="!client.canRevoke"
(sqxConfirmClick)="revoke()"
confirmTitle="Revoke client"
confirmText="Do you really want to revoke the client?">
<i class="icon-bin2"></i>
</button>
</div>
</div>
</div>
<div class="card-body">
<div class="container">
<div class="form-group row">
<label class="col-3 col-form-label">
Client Id
</label>
<div class="col cell-input">
<input readonly class="form-control" value="{{appsState.appName}}:{{client.id}}" #inputName />
</div>
<div class="col-auto cell-actions no-padding">
<button type="button" class="btn btn-text" [sqxCopy]="inputName">
<i class="icon-copy"></i>
</button>
</div>
</div>
<div class="form-group row">
<label class="col-3 col-form-label">
Client Secret
</label>
<div class="col cell-input">
<input readonly class="form-control" [attr.value]="client.secret" #inputSecret />
</div>
<div class="col-auto cell-actions no-padding">
<button type="button" class="btn btn-text" [sqxCopy]="inputSecret">
<i class="icon-copy"></i>
</button>
</div>
</div>
<div class="form-group row">
<label class="col-3 col-form-label">
Role
</label>
<div class="col cell-input">
<select class="form-control"
[disabled]="!client.canUpdate"
[ngModel]="client.role"
(ngModelChange)="update($event)">
<option *ngFor="let role of clientRoles; trackBy: trackByRole" [ngValue]="role.name">{{role.name}}</option>
</select>
</div>
<div class="col-auto cell-actions"></div>
</div>
</div>
</div>
</div>
<ng-container *sqxModal="connectDialog">
<sqx-modal-dialog large="true" (close)="connectDialog.hide()">
<ng-container title>
Connect
</ng-container>
<ng-container content>
<div class="help">
<h2>How to connect to this client</h2>
<h3>Using HTTP</h3>
<p>
1. Make the following request to get an access token. It will be valid for 30 days.
<sqx-code>{{connectHttpText}}</sqx-code>
</p>
<p>
2. Add the bearer token as authorization header to all requests:
<sqx-code>Authorization: Bearer [YOUR_TOKEN]</sqx-code>
</p>
<p>
Use the following token for testing
<sqx-code>{{connectToken?.accessToken}}</sqx-code>
</p>
<h3>Using the command line interface (CLI)</h3>
<p>
Download the CLI here: <a href="https://github.com/Squidex/squidex-samples/releases" sqxExternalLink>CLI Releases (Linux, OS X, Windows)</a>
</p>
<p>
Connect with .NET SDK:
<sqx-code>{{connectCLINetText}}</sqx-code>
</p>
<p>
Connect with Windows:
<sqx-code>{{connectCLIWinText}}</sqx-code>
</p>
<p>
Connect with Linux / OS X
<sqx-code>{{connectCLINixText}}</sqx-code>
</p>
<h3>Using the C# Client Library</h3>
<p>
Get the nuget library from <a href="https://www.nuget.org/packages/Squidex.ClientLibrary/" sqxExternalLink>nuget.org</a>
</p>
<p>
Create a client manager
<sqx-code>{{connectLibraryText}}</sqx-code>
</p>
</div>
</ng-container>
</sqx-modal-dialog>
</ng-container>