-
Notifications
You must be signed in to change notification settings - Fork 588
Add slo support for multiple orgs #7583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,10 @@ | |
| import org.wso2.carbon.identity.application.authentication.framework.AuthenticatorStateInfo; | ||
| import org.wso2.carbon.identity.application.common.model.IdentityProvider; | ||
|
|
||
| import java.io.ByteArrayInputStream; | ||
| import java.io.ByteArrayOutputStream; | ||
| import java.io.ObjectInputStream; | ||
| import java.io.ObjectOutputStream; | ||
| import java.io.Serializable; | ||
| import java.util.ArrayList; | ||
| import java.util.HashMap; | ||
|
|
@@ -154,4 +158,18 @@ public void setTenantDomain(String tenantDomain) { | |
|
|
||
| this.tenantDomain = tenantDomain; | ||
| } | ||
|
|
||
| public static <T extends Serializable> T deepCopy(T obj) { | ||
|
|
||
| try { | ||
| ByteArrayOutputStream bos = new ByteArrayOutputStream(); | ||
| ObjectOutputStream oos = new ObjectOutputStream(bos); | ||
| oos.writeObject(obj); | ||
| ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); | ||
| ObjectInputStream ois = new ObjectInputStream(bis); | ||
| return (T) ois.readObject(); | ||
| } catch (Exception e) { | ||
| throw new RuntimeException(e); | ||
| } | ||
| } | ||
|
Comment on lines
+162
to
+174
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ | |
| import org.apache.commons.lang.StringUtils; | ||
| import org.apache.commons.lang3.SerializationUtils; | ||
| import org.wso2.carbon.identity.application.authentication.framework.AuthenticatorStateInfo; | ||
| import org.wso2.carbon.identity.application.authentication.framework.config.model.AuthenticatorConfig; | ||
| import org.wso2.carbon.identity.application.authentication.framework.config.model.ExternalIdPConfig; | ||
| import org.wso2.carbon.identity.application.authentication.framework.config.model.SequenceConfig; | ||
| import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedIdPData; | ||
|
|
@@ -120,6 +121,30 @@ public class AuthenticationContext extends MessageContext implements Serializabl | |
|
|
||
| private boolean sendToMultiOptionPage; | ||
|
|
||
| private Map<Integer, AuthenticatorConfig> orgAuthenticatorConfigs = new HashMap<>(); | ||
|
|
||
| public Map<Integer, AuthenticatorConfig> getOrgAuthenticatorConfigs() { | ||
|
|
||
| return orgAuthenticatorConfigs; | ||
| } | ||
|
Comment on lines
+126
to
+129
|
||
|
|
||
| public void addOrganicAuthenticatorConfig(int orgNumber, AuthenticatorConfig authenticatorConfig) { | ||
|
|
||
| this.orgAuthenticatorConfigs.put(orgNumber, authenticatorConfig); | ||
| } | ||
|
Comment on lines
+131
to
+134
|
||
|
|
||
| private int currentOrgNumber; | ||
|
|
||
| public int getCurrentOrgNumber() { | ||
|
|
||
| return currentOrgNumber; | ||
| } | ||
|
Comment on lines
+138
to
+141
|
||
|
|
||
| public void setCurrentOrgNumber(int currentOrgNumber) { | ||
|
|
||
| this.currentOrgNumber = currentOrgNumber; | ||
| } | ||
|
Comment on lines
+143
to
+146
|
||
|
|
||
| /** | ||
| * This attribute holds the context expiry time in epoch timestamp (nanoseconds). | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |||||
| package org.wso2.carbon.identity.application.authentication.framework.handler.request.impl; | ||||||
|
|
||||||
| import org.apache.commons.codec.digest.DigestUtils; | ||||||
| import org.apache.commons.collections.MapUtils; | ||||||
| import org.apache.commons.lang.StringUtils; | ||||||
| import org.apache.commons.logging.Log; | ||||||
| import org.apache.commons.logging.LogFactory; | ||||||
|
|
@@ -43,7 +44,7 @@ | |||||
| import org.wso2.carbon.identity.application.authentication.framework.internal.util.SessionEventPublishingUtil; | ||||||
| import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedIdPData; | ||||||
| import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser; | ||||||
| import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticationResult; | ||||||
| import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticationResult;xw | ||||||
|
||||||
| import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticationResult;xw | |
| import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticationResult; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docstring for the public method 'deepCopy'. All public methods should have a docstring explaining the purpose, parameters, return value, and potential exceptions.