-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for flow of post-authentication (MID-7375, MID-7376)
- Loading branch information
Showing
6 changed files
with
64 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 46 additions & 42 deletions
88
...ui/src/main/java/com/evolveum/midpoint/web/security/channel/GuiAuthenticationChannel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,46 @@ | ||
/* | ||
* Copyright (c) 2010-2019 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.web.security.channel; | ||
|
||
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; | ||
import com.evolveum.midpoint.model.api.ModelInteractionService; | ||
import com.evolveum.midpoint.schema.constants.SchemaConstants; | ||
import com.evolveum.midpoint.task.api.TaskManager; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.AuthenticationSequenceChannelType; | ||
|
||
/** | ||
* @author skublik | ||
*/ | ||
|
||
public class GuiAuthenticationChannel extends AuthenticationChannelImpl { | ||
|
||
private TaskManager taskManager; | ||
private ModelInteractionService modelInteractionService; | ||
|
||
public GuiAuthenticationChannel(AuthenticationSequenceChannelType channel, TaskManager taskManager, ModelInteractionService modelInteractionService) { | ||
super(channel); | ||
this.taskManager = taskManager; | ||
this.modelInteractionService = modelInteractionService; | ||
} | ||
|
||
public String getChannelId() { | ||
return SchemaConstants.CHANNEL_USER_URI; | ||
} | ||
|
||
public String getPathAfterSuccessfulAuthentication() { | ||
if (WebModelServiceUtils.isPostAuthenticationEnabled(taskManager, modelInteractionService)) { | ||
return "/self/postAuthentication"; | ||
} | ||
|
||
return super.getPathAfterSuccessfulAuthentication(); | ||
} | ||
|
||
} | ||
/* | ||
* Copyright (c) 2010-2019 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.web.security.channel; | ||
|
||
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; | ||
import com.evolveum.midpoint.model.api.ModelInteractionService; | ||
import com.evolveum.midpoint.schema.constants.SchemaConstants; | ||
import com.evolveum.midpoint.task.api.TaskManager; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.AuthenticationSequenceChannelType; | ||
|
||
/** | ||
* @author skublik | ||
*/ | ||
|
||
public class GuiAuthenticationChannel extends AuthenticationChannelImpl { | ||
|
||
private TaskManager taskManager; | ||
private ModelInteractionService modelInteractionService; | ||
|
||
public GuiAuthenticationChannel(AuthenticationSequenceChannelType channel, TaskManager taskManager, ModelInteractionService modelInteractionService) { | ||
super(channel); | ||
this.taskManager = taskManager; | ||
this.modelInteractionService = modelInteractionService; | ||
} | ||
|
||
public String getChannelId() { | ||
return SchemaConstants.CHANNEL_USER_URI; | ||
} | ||
|
||
public String getPathAfterSuccessfulAuthentication() { | ||
if (isPostAuthenticationEnabled()) { | ||
return "/self/postAuthentication"; | ||
} | ||
|
||
return super.getPathAfterSuccessfulAuthentication(); | ||
} | ||
|
||
@Override | ||
public boolean isPostAuthenticationEnabled() { | ||
return WebModelServiceUtils.isPostAuthenticationEnabled(taskManager, modelInteractionService); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters