introducing new getter for SessionContext
@@ -22,7 +22,9 @@ import org.wso2.carbon.identity.application.authentication.framework.config.mode
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedIdPData;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -63,6 +65,16 @@ public class SessionContext implements Serializable {
return authenticatedIdPsOfApp.get(app);
}
+ /**
+ * Retrieve the names of authenticated applications of the session.
+ *
+ * @return a list of names of authenticated applications.
+ */
+ public List<String> getAuthenticatedIdPsOfApp() {
+
+ return new ArrayList<>(authenticatedIdPsOfApp.keySet());
+ }
+
public void setAuthenticatedIdPsOfApp(String app, Map<String, AuthenticatedIdPData> authenticatedIdPsOfApp) {
if (this.authenticatedIdPsOfApp == null) {
