Merge pull request #1509 from stianst/master

Admin console fixes
This commit is contained in:
Stian Thorgersen 2015-07-27 13:31:16 +02:00
commit 210b570c89
9 changed files with 32 additions and 38 deletions

View file

@ -1,7 +1,4 @@
.navbar-pf .navbar-brand {
background: url('../img/red-hat-logo.png') no-repeat 0px 0px;
display: block;
height: 25px;
width: 200px;
background: url('../img/red-hat-logo.png') no-repeat 0px 5px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -1,3 +1,3 @@
parent=keycloak
import=common/keycloak
styles=css/styles.css lib/patternfly/css/patternfly.css lib/select2-3.4.1/select2.css css/styles.css css/logo.css
styles=lib/patternfly/css/patternfly.css lib/select2-3.4.1/select2.css css/styles.css css/logo.css

View file

@ -310,17 +310,23 @@ module.controller('ClientCertificateExportCtrl', function($scope, $location, $ht
data: $scope.jks,
headers: {
'Content-Type': 'application/json',
'Accept': 'client/octet-stream'
'Accept': 'application/octet-stream'
}
}).success(function(data){
var blob = new Blob([data], {
type: 'client/octet-stream'
type: 'application/octet-stream'
});
var ext = ".jks";
if ($scope.jks.format == 'PKCS12') ext = ".p12";
saveAs(blob, 'keystore' + ext);
}).error(function(){
Notifications.error("Error downloading.");
}).error(function(data) {
var errorMsg = 'Error downloading';
try {
var error = JSON.parse(String.fromCharCode.apply(null, new Uint8Array(data)));
errorMsg = error['error_description'] ? error['error_description'] : errorMsg;
} catch (err) {
}
Notifications.error(errorMsg);
});
}

View file

@ -9,7 +9,7 @@
<th colspan="6" class="kc-table-actions">
<div class="dropdown pull-left">
<select class="form-control" ng-model="flow"
ng-options="flow.alias for flow in flows"
ng-options="(flow.alias|capitalize) for flow in flows"
data-ng-change="setupForm()">
</select>
</div>
@ -24,7 +24,7 @@
<tbody>
<tr ng-repeat="execution in executions" data-ng-show="executions.length > 0">
<td ng-show="execution.subFlow"></td>
<td><h2>{{execution.referenceType}}</h2></td>
<td>{{execution.referenceType|capitalize}}</td>
<td ng-hide="execution.subFlow"></td>
<td ng-repeat="choice in execution.requirementChoices">
<!--

View file

@ -30,9 +30,9 @@
</div>
<div class="form-group">
<div class="col-md-10 col-md-offset-2" data-ng-show="access.manageRealm">
<button class="btn btn-primary" type="submit" data-ng-click="generateSigningKey()">Generate new keys</button>
<button class="btn btn-primary" type="submit" data-ng-click="importSigningKey()">Import</button>
<button class="btn btn-primary" type="submit" data-ng-hide="!signingKeyInfo.certificate" data-ng-click="exportSigningKey()">Export</button>
<button class="btn btn-default" type="submit" data-ng-click="generateSigningKey()">Generate new keys</button>
<button class="btn btn-default" type="submit" data-ng-click="importSigningKey()">Import</button>
<button class="btn btn-default" type="submit" data-ng-hide="!signingKeyInfo.certificate" data-ng-click="exportSigningKey()">Export</button>
</div>
</div>
</fieldset>
@ -56,9 +56,9 @@
</div>
<div class="form-group">
<div class="col-md-10 col-md-offset-2" data-ng-show="access.manageRealm">
<button class="btn btn-primary" type="submit" data-ng-click="generateEncryptionKey()">Generate new keys</button>
<button class="btn btn-primary" type="submit" data-ng-click="importEncryptionKey()">Import</button>
<button class="btn btn-primary" type="submit" data-ng-hide="!encryptionKeyInfo.certificate" data-ng-click="exportEncryptionKey()">Export</button>
<button class="btn btn-default" type="submit" data-ng-click="generateEncryptionKey()">Generate new keys</button>
<button class="btn btn-default" type="submit" data-ng-click="importEncryptionKey()">Import</button>
<button class="btn btn-default" type="submit" data-ng-hide="!encryptionKeyInfo.certificate" data-ng-click="exportEncryptionKey()">Export</button>
</div>
</div>
</fieldset>

View file

@ -5,8 +5,6 @@
<li>{{client.clientId}}</li>
</ol>
<h1>{{client.clientId|capitalize}}</h1>
<kc-tabs-client></kc-tabs-client>
<h2><span>{{client.clientId}}</span> Service Accounts </h2>

View file

@ -2,15 +2,6 @@ html,body {
height: 100%;
}
/**
.navbar-pf .navbar-brand {
background: url('../img/brand.svg') no-repeat 0px 5px;
display: block;
height: 25px;
width: 200px;
}
**/
form {
margin-top: 20px;
}
@ -269,15 +260,15 @@ table {
border-top: none!important;
}
.navbar-brand{
padding: 0!important;
height: 56px!important;
.navbar-pf .navbar-brand {
padding: 0;
height: 56px;
line-height: 56px;
background-position: center center!important;
background-image: url('../img/keyclok-logo.svg')!important;
background-size: 148px 36px !important;
background-repeat: no-repeat;
width: 148px!important;
background-position: center center;
background-image: url('../img/keyclok-logo.svg');
background-size: 148px 36px;
background-repeat: no-repeat;
width: 148px;
}
.navbar-pf .navbar-utility > li > a{

View file

@ -11,6 +11,7 @@ import org.keycloak.models.ClientModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.utils.KeycloakModelUtils;
import org.keycloak.services.ErrorResponseException;
import org.keycloak.util.CertificateUtils;
import org.keycloak.util.PemUtils;
@ -21,6 +22,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.io.ByteArrayOutputStream;
@ -281,10 +283,10 @@ public class ClientAttributeCertificateResource {
throw new NotFoundException("keypair not generated for client");
}
if (privatePem != null && config.getKeyPassword() == null) {
throw new BadRequestException("Need to specify a key password for jks download");
throw new ErrorResponseException("password-missing", "Need to specify a key password for jks download", Response.Status.BAD_REQUEST);
}
if (config.getStorePassword() == null) {
throw new BadRequestException("Need to specify a store password for jks download");
throw new ErrorResponseException("password-missing", "Need to specify a store password for jks download", Response.Status.BAD_REQUEST);
}
final KeyStore keyStore;
try {