Started working on credentials tab.

pull/763/head
Fredrik Jönsson 2015-02-09 16:37:11 +01:00
parent d308f58e71
commit 3f9f33f9a4
4 changed files with 67 additions and 38 deletions

View File

@ -354,7 +354,7 @@ var ClientView = Backbone.View.extend({
deleteClient:function (e) { deleteClient:function (e) {
e.preventDefault(); e.preventDefault();
if (confirm("Are you sure sure you would like to delete this client?")) { if (confirm($.t('client.client-table.confirm'))) {
var _self = this; var _self = this;
this.model.destroy({ this.model.destroy({

View File

@ -17,7 +17,9 @@
"client-form": { "client-form": {
"access": "Access", "access": "Access",
"allow-introspection": "Allow calls to the Introspection Endpoint?", "allow-introspection": "Allow calls to the Introspection Endpoint?",
"authentication-method": "Token Endpoint Authentication Method",
"authorization-code": "authorization code", "authorization-code": "authorization code",
"client-credentials": "client credentials",
"client-description": "Description", "client-description": "Description",
"client-description-help": "Human-readable text description", "client-description-help": "Human-readable text description",
"client-description-placeholder": "Type a description", "client-description-placeholder": "Type a description",
@ -27,12 +29,15 @@
"client-name": "Client name", "client-name": "Client name",
"client-name-help": "Human-readable application name", "client-name-help": "Human-readable application name",
"client-name-placeholder": "Type something", "client-name-placeholder": "Type something",
"client-secret": "Client Secret",
"contacts": "Kontakter", "contacts": "Kontakter",
"contacts-placeholder": "new contact", "contacts-placeholder": "new contact",
"client-credentials": "client credentials",
"credentials": "Credentials", "credentials": "Credentials",
"crypto": "Crypto", "crypto": "Crypto",
"display-secret": "Display/edit client secret:",
"edit": "Edit Client", "edit": "Edit Client",
"generate-new-secret": "Generate a new client secret?",
"generate-new-secret-help": "New secret will be generated when you click 'Save'",
"grant-types": "Grant Types", "grant-types": "Grant Types",
"home": "Home Page", "home": "Home Page",
"home-help": "URL for the client's home page, will be displayed to the user", "home-help": "URL for the client's home page, will be displayed to the user",
@ -53,6 +58,11 @@
"refresh": "refresh", "refresh": "refresh",
"registered": "Registered at", "registered": "Registered at",
"response-types": "Response Types", "response-types": "Response Types",
"secret-asymmetric-jwt": "Asymmetrically-signed JWT assertion",
"secret-http": "Client Secret over HTTP Basic",
"secret-none": "No authentication",
"secret-post": "Client Secret over HTTP POST",
"secret-symmetric-jwt": "Client Secret via symmetrically-signed JWT assertion",
"sector-identifier": "Sector Identifier URI", "sector-identifier": "Sector Identifier URI",
"subject-type": "Subject Type", "subject-type": "Subject Type",
"terms": "Terms of Service", "terms": "Terms of Service",
@ -63,6 +73,7 @@
"type-web": "Web" "type-web": "Web"
}, },
"client-table": { "client-table": {
"confirm": "Are you sure sure you would like to delete this client?",
"match": { "match": {
"contacts": "contacts", "contacts": "contacts",
"description": "description", "description": "description",

View File

@ -18,6 +18,7 @@
"access": "Behörigheter", "access": "Behörigheter",
"allow-introspection": "Tillåt anrop till introspektionsfunktionen?", "allow-introspection": "Tillåt anrop till introspektionsfunktionen?",
"authorization-code": "auktoriseringskod", "authorization-code": "auktoriseringskod",
"authentication-method": "Autentiseringsmetod för att hämta ut nycklar (token endpoint)",
"client-credentials": "klienthemligheter", "client-credentials": "klienthemligheter",
"client-description": "Beskrivning", "client-description": "Beskrivning",
"client-description-help": "Läsbar och begriplig text som beskriver klienten", "client-description-help": "Läsbar och begriplig text som beskriver klienten",
@ -29,11 +30,15 @@
"client-name-help": "Läsbar och begripligt namn på klienten", "client-name-help": "Läsbar och begripligt namn på klienten",
"client-name-placeholder": "Skriv någonting", "client-name-placeholder": "Skriv någonting",
"client-password": "lösenord", "client-password": "lösenord",
"client-secret": "Client Secret",
"contacts": "Kontakter", "contacts": "Kontakter",
"contacts-placeholder": "ny kontakt", "contacts-placeholder": "ny kontakt",
"credentials": "Hemligheter", "credentials": "Hemligheter",
"crypto": "Krypto", "crypto": "Krypto",
"display-secret": "Display/edit client secret:",
"edit": "Ändra klient", "edit": "Ändra klient",
"generate-new-secret": "Generera en ny klienthemlighet?",
"generate-new-secret-help": "En ny hemlighet kommer att genereras när du klickar på 'Save'",
"grant-types": "Grant-typer", "grant-types": "Grant-typer",
"home": "Hemsida", "home": "Hemsida",
"home-help": "Länk till tjänstens hemsida. Den kommer att visas på bekräftelsesidan.", "home-help": "Länk till tjänstens hemsida. Den kommer att visas på bekräftelsesidan.",
@ -52,6 +57,11 @@
"redirect-uris": "Omdirigieringslänkar", "redirect-uris": "Omdirigieringslänkar",
"refresh": "refresh", "refresh": "refresh",
"registered": "Registrerad", "registered": "Registrerad",
"secret-asymmetric-jwt": "Asymmetriskt signerad JWT assertion",
"secret-http": "Klienthemlighet över HTTP Basic",
"secret-none": "Ingen autentisering",
"secret-post": "Klienthemlighet över HTTP POST",
"secret-symmetric-jwt": "Klienthemlighet via symmetriskt signerad JWT assertion",
"sector-identifier": "Sector Identifier-länk", "sector-identifier": "Sector Identifier-länk",
"sector-identifier-help": "Sector Identifier för JavaScript.", "sector-identifier-help": "Sector Identifier för JavaScript.",
"subject-type": "Subjekttyp", "subject-type": "Subjekttyp",
@ -63,6 +73,7 @@
"type-web": "Webb" "type-web": "Webb"
}, },
"client-table": { "client-table": {
"confirm": "Är du säker på att du vill ta bort denna klient?",
"match": { "match": {
"contacts": "kontakter", "contacts": "kontakter",
"description": "beskrivning", "description": "beskrivning",

View File

@ -184,7 +184,7 @@
<li class="active"><a data-target="#client-main-tab" data-toggle="tab" href="#" data-i18n="client.client-form.main">Main</a></li> <li class="active"><a data-target="#client-main-tab" data-toggle="tab" href="#" data-i18n="client.client-form.main">Main</a></li>
<li><a data-target="#client-access-tab" data-toggle="tab" href="#" data-i18n="client.client-form.access">Access</a></li> <li><a data-target="#client-access-tab" data-toggle="tab" href="#" data-i18n="client.client-form.access">Access</a></li>
<li><a data-target="#client-secret-tab" data-toggle="tab" href="#" data-i18n="client.client-form.credentials">Credentials</a></li> <li><a data-target="#client-secret-tab" data-toggle="tab" href="#" data-i18n="client.client-form.credentials">Credentials</a></li>
<li><a data-target="#client-token-tab" data-toggle="tab" href="#" data-i18n="client.client-form.main">Tokens</a></li> <li><a data-target="#client-token-tab" data-toggle="tab" href="#" data-i18n="client.client-form.tokens">Tokens</a></li>
<li><a data-target="#client-crypto-tab" data-toggle="tab" href="#" data-i18n="client.client-form.crypto">Crypto</a></li> <li><a data-target="#client-crypto-tab" data-toggle="tab" href="#" data-i18n="client.client-form.crypto">Crypto</a></li>
<li><a data-target="#client-other-tab" data-toggle="tab" href="#" data-i18n="client.client-form.other">Other</a></li> <li><a data-target="#client-other-tab" data-toggle="tab" href="#" data-i18n="client.client-form.other">Other</a></li>
</ul> </ul>
@ -343,31 +343,31 @@
<div class="controls"> <div class="controls">
<div> <div>
<input id="responseTypes-code" type="checkbox" <%-($.inArray("code", responseTypes) > -1 ? 'checked' : '')%>> <input id="responseTypes-code" type="checkbox" <%-($.inArray("code", responseTypes) > -1 ? 'checked' : '')%>>
<label class="checkbox">code</label> <label for="responseTypes-code" class="checkbox">code</label>
</div> </div>
<div> <div>
<input id="responseTypes-token" type="checkbox" <%-($.inArray("token", responseTypes) > -1 ? 'checked' : '')%>> <input id="responseTypes-token" type="checkbox" <%-($.inArray("token", responseTypes) > -1 ? 'checked' : '')%>>
<label class="checkbox">token</label> <label for="responseTypes-token" class="checkbox">token</label>
</div> </div>
<div> <div>
<input id="responseTypes-idtoken" type="checkbox" <%-($.inArray("id_token", responseTypes) > -1 ? 'checked' : '')%>> <input id="responseTypes-idtoken" type="checkbox" <%-($.inArray("id_token", responseTypes) > -1 ? 'checked' : '')%>>
<label class="checkbox">id_token</label> <label for="responseTypes-idtoken" class="checkbox">id_token</label>
</div> </div>
<div> <div>
<input id="responseTypes-token-idtoken" type="checkbox" <%-($.inArray("token id_token", responseTypes) > -1 ? 'checked' : '')%>> <input id="responseTypes-token-idtoken" type="checkbox" <%-($.inArray("token id_token", responseTypes) > -1 ? 'checked' : '')%>>
<label class="checkbox">token id_token</label> <label for="responseTypes-token-idtoken" class="checkbox">token id_token</label>
</div> </div>
<div> <div>
<input id="responseTypes-code-idtoken" type="checkbox" <%-($.inArray("code id_token", responseTypes) > -1 ? 'checked' : '')%>> <input id="responseTypes-code-idtoken" type="checkbox" <%-($.inArray("code id_token", responseTypes) > -1 ? 'checked' : '')%>>
<label class="checkbox">code id_token</label> <label for="responseTypes-code-idtoken" class="checkbox">code id_token</label>
</div> </div>
<div> <div>
<input id="responseTypes-code-token" type="checkbox" <%-($.inArray("code token", responseTypes) > -1 ? 'checked' : '')%>> <input id="responseTypes-code-token" type="checkbox" <%-($.inArray("code token", responseTypes) > -1 ? 'checked' : '')%>>
<label class="checkbox">code token</label> <label for="responseTypes-code-token" class="checkbox">code token</label>
</div> </div>
<div> <div>
<input id="responseTypes-code-token-idtoken" type="checkbox" <%-($.inArray("code token id_token", responseTypes) > -1 ? 'checked' : '')%>> <input id="responseTypes-code-token-idtoken" type="checkbox" <%-($.inArray("code token id_token", responseTypes) > -1 ? 'checked' : '')%>>
<label class="checkbox">code token id_token</label> <label for="responseTypes-code-token-idtoken" class="checkbox">code token id_token</label>
</div> </div>
</div> </div>
</div> </div>
@ -386,10 +386,10 @@
<label class="control-label" data-i18n="client.client-form.subject-type">Subject Type</label> <label class="control-label" data-i18n="client.client-form.subject-type">Subject Type</label>
<div class="controls"> <div class="controls">
<div> <div>
<input type="radio" name="subjectType" value="PUBLIC" <%-(subjectType == 'PUBLIC' ? 'checked' : '')%>> <input id="control-label-public" type="radio" name="subjectType" value="PUBLIC" <%-(subjectType == 'PUBLIC' ? 'checked' : '')%>>
<label class="radio inline" data-i18n="client.client-form.public">Public</label> <label for="control-label-public" class="radio inline" data-i18n="client.client-form.public">Public</label>
<input type="radio" name="subjectType" value="PAIRWISE" <%-(subjectType == 'PAIRWISE' ? 'checked' : '')%>> <input id="control-label-pairwise" type="radio" name="subjectType" value="PAIRWISE" <%-(subjectType == 'PAIRWISE' ? 'checked' : '')%>>
<label class="radio inline" data-i18n="client.client-form.pairwise">Pairwise</label> <label for="control-label-pairwise" class="radio inline" data-i18n="client.client-form.pairwise">Pairwise</label>
</div> </div>
</div> </div>
</div> </div>
@ -407,43 +407,50 @@
<div class="tab-pane" id="client-secret-tab"> <div class="tab-pane" id="client-secret-tab">
<div class="control-group" id="tokenEndpointAuthMethod"> <div class="control-group" id="tokenEndpointAuthMethod">
<label class="control-label">Token Endpoint Authentication Method</label> <label class="control-label" data-i18n="client.client-form.authentication-method">Token Endpoint Authentication Method</label>
<div class="controls"> <div class="controls">
<label class="radio"> <div>
<input type="radio" name="tokenEndpointAuthMethod" value="SECRET_BASIC" <%-(tokenEndpointAuthMethod == 'SECRET_BASIC' ? 'checked' : '')%>> Client Secret over HTTP Basic <input type="radio" id="tokenEndpointAuthMethodBasic" name="tokenEndpointAuthMethod" value="SECRET_BASIC" <%-(tokenEndpointAuthMethod == 'SECRET_BASIC' ? 'checked' : '')%>>
</label> <label for="tokenEndpointAuthMethodBasic" class="radio" data-i18n="client.client-form.secret-http">Client Secret over HTTP Basic</label>
<label class="radio"> </div>
<input type="radio" name="tokenEndpointAuthMethod" value="SECRET_POST" <%-(tokenEndpointAuthMethod == 'SECRET_POST' ? 'checked' : '')%>> Client Secret over HTTP POST <div>
</label> <input type="radio" id="tokenEndpointAuthMethodPost" name="tokenEndpointAuthMethod" value="SECRET_POST" <%-(tokenEndpointAuthMethod == 'SECRET_POST' ? 'checked' : '')%>>
<label class="radio"> <label for="tokenEndpointAuthMethodPost" class="radio" data-i18n="client.client-form.secret-post">Client Secret over HTTP POST</label>
<input type="radio" name="tokenEndpointAuthMethod" value="SECRET_JWT" <%-(tokenEndpointAuthMethod == 'SECRET_JWT' ? 'checked' : '')%>> Client Secret via symmetrically-signed JWT assertion </div>
</label> <div>
<label class="radio"> <input type="radio" id="tokenEndpointAuthMethodSymm" name="tokenEndpointAuthMethod" value="SECRET_JWT" <%-(tokenEndpointAuthMethod == 'SECRET_JWT' ? 'checked' : '')%>>
<input type="radio" name="tokenEndpointAuthMethod" value="PRIVATE_KEY" <%-(tokenEndpointAuthMethod == 'PRIVATE_KEY' ? 'checked' : '')%>> Asymmetrically-signed JWT assertion <label for="tokenEndpointAuthMethodSymm" class="radio" data-i18n="client.client-form.secret-symmetric-jwt">Client Secret via symmetrically-signed JWT assertion</label>
</label> </div>
<label class="radio"> <div>
<input type="radio" name="tokenEndpointAuthMethod" value="NONE" <%-(tokenEndpointAuthMethod == 'NONE' ? 'checked' : '')%>> No authentication <input type="radio" id="tokenEndpointAuthMethodAssym" name="tokenEndpointAuthMethod" value="PRIVATE_KEY" <%-(tokenEndpointAuthMethod == 'PRIVATE_KEY' ? 'checked' : '')%>>
</label> <label for="tokenEndpointAuthMethodAssym" class="radio" data-i18n="client.client-form.secret-asymmetric-jwt">Asymmetrically-signed JWT assertion</label>
</div>
<div>
<input type="radio" id="tokenEndpointAuthMethodNone" name="tokenEndpointAuthMethod" value="NONE" <%-(tokenEndpointAuthMethod == 'NONE' ? 'checked' : '')%>>
<label for="tokenEndpointAuthMethodNone" class="radio" data-i18n="client.client-form.secret-none">No authentication</label>
</div>
</div> </div>
</div> </div>
<div id="clientSecretPanel"> <div id="clientSecretPanel">
<label class="control-label">Client Secret</label> <label class="control-label" data-i18n="client.client-form.client-secret">Client Secret</label>
<div class="control-group" id="generateClientSecret"> <div class="control-group" id="generateClientSecret">
<div class="controls"> <div class="controls">
<label class="checkbox"> <div>
<input type="checkbox" <%-(generateClientSecret == true ? 'checked' : '')%>> Generate a new client secret? <input id="clientSecretPanelInput" type="checkbox" <%-(generateClientSecret == true ? 'checked' : '')%>>
</label> <label for="clientSecretPanelInput" class="checkbox" data-i18n="client.client-form.generate-new-secret">Generate a new client secret?</label>
<p class="help-block">New secret will be generated when you click 'Save'</p> </div>
<p class="help-block" data-i18n="client.client-form.generate-new-secret-help">New secret will be generated when you click 'Save'</p>
</div> </div>
</div> </div>
<div class="control-group" id="displayClientSecret"> <div class="control-group" id="displayClientSecret">
<div class="controls"> <div class="controls">
<label class="checkbox"> <div>
<input type="checkbox" <%-(displayClientSecret == true ? 'checked' : '')%>> Display/edit client secret: <label id="displayClientSecretInput" class="checkbox" data-i18n="client.client-form.display-secret">Display/edit client secret:</label>
</label> <input for="displayClientSecretInput" type="checkbox" <%-(displayClientSecret == true ? 'checked' : '')%>>
</div>
</div> </div>
</div> </div>