Merge remote-tracking branch 'keycloak/master' into french-i18n
This commit is contained in:
commit
d4e0901599
4 changed files with 24 additions and 8 deletions
|
@ -1711,6 +1711,10 @@ module.controller('AuthenticationFlowsCtrl', function($scope, $route, realm, flo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.selectFlow = function(flow) {
|
||||||
|
$location.url("/realms/" + realm.realm + '/authentication/flows/' + flow.alias);
|
||||||
|
};
|
||||||
|
|
||||||
var setupForm = function() {
|
var setupForm = function() {
|
||||||
AuthenticationFlowExecutions.query({realm: realm.realm, alias: $scope.flow.alias}, function(data) {
|
AuthenticationFlowExecutions.query({realm: realm.realm, alias: $scope.flow.alias}, function(data) {
|
||||||
$scope.executions = data;
|
$scope.executions = data;
|
||||||
|
@ -1830,9 +1834,11 @@ module.controller('AuthenticationFlowsCtrl', function($scope, $route, realm, flo
|
||||||
|
|
||||||
$scope.setupForm = setupForm;
|
$scope.setupForm = setupForm;
|
||||||
|
|
||||||
setupForm();
|
if (selectedFlow == null) {
|
||||||
|
$scope.selectFlow(flows[0]);
|
||||||
|
} else {
|
||||||
|
setupForm();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
module.controller('RequiredActionsCtrl', function($scope, realm, unregisteredRequiredActions,
|
module.controller('RequiredActionsCtrl', function($scope, realm, unregisteredRequiredActions,
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="dropdown pull-left">
|
<div class="dropdown pull-left">
|
||||||
<select class="form-control" ng-model="flow"
|
<select class="form-control" ng-model="flow"
|
||||||
ng-options="(flow.alias|capitalize) for flow in flows"
|
ng-options="(flow.alias|capitalize) for flow in flows"
|
||||||
data-ng-change="setupForm()">
|
data-ng-change="selectFlow(flow)">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<i class="fa fa-question-circle text-muted" tooltip-trigger="mouseover mouseout" tooltip="{{flow.description}}" tooltip-placement="right"> </i>
|
<i class="fa fa-question-circle text-muted" tooltip-trigger="mouseover mouseout" tooltip="{{flow.description}}" tooltip-placement="right"> </i>
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.keycloak.models.ClientSessionModel;
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
import org.keycloak.models.IdentityProviderModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.RealmModel;
|
import org.keycloak.models.RealmModel;
|
||||||
import org.keycloak.models.utils.DefaultAuthenticationFlows;
|
|
||||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
import org.keycloak.models.utils.KeycloakModelUtils;
|
||||||
import org.keycloak.protocol.RestartLoginCookie;
|
import org.keycloak.protocol.RestartLoginCookie;
|
||||||
import org.keycloak.protocol.oidc.OIDCLoginProtocol;
|
import org.keycloak.protocol.oidc.OIDCLoginProtocol;
|
||||||
|
@ -310,9 +309,12 @@ public class AuthorizationEndpoint {
|
||||||
private Response buildRegister() {
|
private Response buildRegister() {
|
||||||
authManager.expireIdentityCookie(realm, uriInfo, clientConnection);
|
authManager.expireIdentityCookie(realm, uriInfo, clientConnection);
|
||||||
|
|
||||||
return session.getProvider(LoginFormsProvider.class)
|
AuthenticationFlowModel flow = realm.getRegistrationFlow();
|
||||||
.setClientSessionCode(new ClientSessionCode(realm, clientSession).getCode())
|
String flowId = flow.getId();
|
||||||
.createRegistration();
|
|
||||||
|
AuthenticationProcessor processor = createProcessor(flowId, LoginActionsService.REGISTRATION_PATH);
|
||||||
|
|
||||||
|
return processor.authenticate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response buildForgotCredential() {
|
private Response buildForgotCredential() {
|
||||||
|
|
|
@ -323,6 +323,14 @@ public class AuthenticationManagementResource {
|
||||||
if (flow.isBuiltIn()) {
|
if (flow.isBuiltIn()) {
|
||||||
throw new BadRequestException("Can't delete built in flow");
|
throw new BadRequestException("Can't delete built in flow");
|
||||||
}
|
}
|
||||||
|
List<AuthenticationExecutionModel> executions = realm.getAuthenticationExecutions(id);
|
||||||
|
for (AuthenticationExecutionModel execution : executions) {
|
||||||
|
if(execution.getFlowId() != null) {
|
||||||
|
AuthenticationFlowModel nonTopLevelFlow = realm.getAuthenticationFlowById(execution.getFlowId());
|
||||||
|
realm.removeAuthenticationFlow(nonTopLevelFlow);
|
||||||
|
}
|
||||||
|
realm.removeAuthenticatorExecution(execution);
|
||||||
|
}
|
||||||
realm.removeAuthenticationFlow(flow);
|
realm.removeAuthenticationFlow(flow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue