mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
api keys
This commit is contained in:
parent
47cd75ca1f
commit
0cccc1e7a0
1 changed files with 39 additions and 0 deletions
|
@ -120,6 +120,45 @@
|
||||||
<a href="@Url.Action("SetPassword", "Manage")" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span> Change password</a>
|
<a href="@Url.Action("SetPassword", "Manage")" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span> Change password</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tab-pane fade in" id="t_api">
|
||||||
|
<h2>API</h2>
|
||||||
|
<p>The ShiftOS API is a way for desktop and mobile applications to easily access certain data from the ShiftOS community in an easy-to-display way. It is also how ShiftOS is able to connect your save file to your ShiftOS account.</p>
|
||||||
|
|
||||||
|
<p>You can use this screen to manage your API keys. These keys give API-level access to your account. You can revoke them at any time.</p>
|
||||||
|
|
||||||
|
<div class="panel panel-danger">
|
||||||
|
<div class="panel-body">
|
||||||
|
<strong>Danger!</strong>
|
||||||
|
<p>Revoking an API key generated by ShiftOS will cause you to lose access to any associated save files.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-8">API key</div>
|
||||||
|
<div class="col-xs-4">Actions</div>
|
||||||
|
</div>
|
||||||
|
@{
|
||||||
|
var db = new Project_Unite.Models.ApplicationDbContext();
|
||||||
|
var keys = db.OAuthTokens.Where(x=>x.UserId==Model.Id).ToArray();
|
||||||
|
}
|
||||||
|
@foreach(var key in keys)
|
||||||
|
{
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-8">
|
||||||
|
<strong>@key.AppName @key.Version</strong>
|
||||||
|
<p>@key.AppDescription</p>
|
||||||
|
<pre>
|
||||||
|
<code>
|
||||||
|
@key.Id
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<a href="@Url.Action("RevokeAPIKey", "Manage", new { id = key.Id })" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Revoke key</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
<input type="submit" value="Update" class="btn btn-primary" />
|
<input type="submit" value="Update" class="btn btn-primary" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue