summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Project-Unite/Views/Manage/Index.cshtml39
1 files changed, 39 insertions, 0 deletions
diff --git a/Project-Unite/Views/Manage/Index.cshtml b/Project-Unite/Views/Manage/Index.cshtml
index 3cf0b02..8794eb2 100644
--- a/Project-Unite/Views/Manage/Index.cshtml
+++ b/Project-Unite/Views/Manage/Index.cshtml
@@ -120,6 +120,45 @@
<a href="@Url.Action("SetPassword", "Manage")" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span> Change password</a>
</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/>
<input type="submit" value="Update" class="btn btn-primary" />
</div>