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() {
|
||||
AuthenticationFlowExecutions.query({realm: realm.realm, alias: $scope.flow.alias}, function(data) {
|
||||
$scope.executions = data;
|
||||
|
@ -1830,9 +1834,11 @@ module.controller('AuthenticationFlowsCtrl', function($scope, $route, realm, flo
|
|||
|
||||
$scope.setupForm = setupForm;
|
||||
|
||||
if (selectedFlow == null) {
|
||||
$scope.selectFlow(flows[0]);
|
||||
} else {
|
||||
setupForm();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
module.controller('RequiredActionsCtrl', function($scope, realm, unregisteredRequiredActions,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="dropdown pull-left">
|
||||
<select class="form-control" ng-model="flow"
|
||||
ng-options="(flow.alias|capitalize) for flow in flows"
|
||||
data-ng-change="setupForm()">
|
||||
data-ng-change="selectFlow(flow)">
|
||||
</select>
|
||||
</div>
|
||||
<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.KeycloakSession;
|
||||
import org.keycloak.models.RealmModel;
|
||||
import org.keycloak.models.utils.DefaultAuthenticationFlows;
|
||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
||||
import org.keycloak.protocol.RestartLoginCookie;
|
||||
import org.keycloak.protocol.oidc.OIDCLoginProtocol;
|
||||
|
@ -310,9 +309,12 @@ public class AuthorizationEndpoint {
|
|||
private Response buildRegister() {
|
||||
authManager.expireIdentityCookie(realm, uriInfo, clientConnection);
|
||||
|
||||
return session.getProvider(LoginFormsProvider.class)
|
||||
.setClientSessionCode(new ClientSessionCode(realm, clientSession).getCode())
|
||||
.createRegistration();
|
||||
AuthenticationFlowModel flow = realm.getRegistrationFlow();
|
||||
String flowId = flow.getId();
|
||||
|
||||
AuthenticationProcessor processor = createProcessor(flowId, LoginActionsService.REGISTRATION_PATH);
|
||||
|
||||
return processor.authenticate();
|
||||
}
|
||||
|
||||
private Response buildForgotCredential() {
|
||||
|
|
|
@ -323,6 +323,14 @@ public class AuthenticationManagementResource {
|
|||
if (flow.isBuiltIn()) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue