Ich verwende V8.0 MobileFirst Platform und ich brauche die aktiven Benutzer zu aktualisieren, nach einem erfolgreichen Login-Attributen. Gibt es eine Lösung, um den aktiven Benutzer ohne Abmeldung zu aktualisieren?IBM MobileFirst V8.0: update aktive Benutzer
0
A
Antwort
1
Sie müssen sich nicht abmelden, um den aktiven Benutzer festzulegen & Sie können aktiven Benutzer in Adapter bald nachdem Benutzer authentifiziert wird mithilfe API setActiveUser
festlegen.
Details zu setActiveUser
und getActiveUser
API kann here finden.
folgende Code ist ein Beispiel dafür, wie es für Mobilefirst 8.0 Enrollment Sample in Adapter zu tun.
public void authorize(Set<String> scope, Map<String, Object> credentials, HttpServletRequest request, AuthorizationResponse response) {
PersistentAttributes attributes = registrationContext.getRegisteredProtectedAttributes();
if (attributes.get("pinCode") != null){
// Is there a user currently active?
if (!userLogin.isLoggedIn()){
// If not, set one here.
authorizationContext.setActiveUser(userLogin.getRegisteredUser());
}
setState(SUCCESS_STATE);
response.addSuccess(scope, getExpiresAt(), this.getName());
} else {
setState(STATE_EXPIRED);
Map <String, Object> failure = new HashMap<String, Object>();
failure.put("failure", "User is not enrolled");
response.addFailure(getName(), failure);
}
}
Für weitere Informationen gehen Sie bitte this tutorial.
Verwandte Themen
- 1. Was ist der Unterschied zwischen der IBM MobileFirst Platform Application Center-Konsole und MobileFirst Foundation V8.0?
- 2. IBM MobileFirst direkte Update- und Sicherheitstools
- 3. IBM MobileFirst Session Affinity
- 4. WORKLIGHT_NATIVE_VERSION in IBM MobileFirst
- 5. IBM MobileFirst HTTPS-Problem
- 6. IBM MobileFirst Platform v8.7
- 7. IBM MobileFirst 7 Abhängigkeiten
- 8. IBM MobileFirst Platform v8.0 - Netzwerkfehler beim Aufruf von http-Adapter von Windows-Anwendung
- 9. Vergleich zwischen IBM MobileFirstPlatform V7.1 und V8.0
- 10. IBM MobileFirst 7.1 Push-Abonnement-Benutzer-ID leer
- 11. Push-Benachrichtigung IBM MobileFirst 7
- 12. IBM MobileFirst 8.0 Neon-Plugin
- 13. IBM MobileFirst 8.0-Konsole - com.google.gson.stream.MalformedJsonException
- 14. Zertifikatsfixierung in IBM MobileFirst Platform
- 15. MobileFirst Plattform auf IBM Container
- 16. IBM MobileFirst Qualitätssicherung - MQA Nicht
- 17. IBM MobileFirst V7.1 Push-Benachrichtigung Problem
- 18. IBM MobileFirst-Plattform Ereignisquelle Push-Benachrichtigung
- 19. IBM MobileFirst 7.1 + Ionic auf Windows 8.1
- 20. Kann die mit MobileFirst SDK7.1 entwickelte Push-Benachrichtigung von MobileFirst Server V8.0 ausgeführt werden?
- 21. Run IBM MobileFirst Platform Foundation auf IBM Container
- 22. Verwendung von Mobilefirst Server V8.0 statt mit Bluemix Service Cloud - Produktion
- 23. IBM MobileFirst 7.1.0 APNS-Zertifikatfehler: Das Zertifikat
- 24. handleFailure nicht im IBM MobileFirst-Client aufgerufen?
- 25. Push-Benachrichtigung in IBM-Mobilefirst unerwarteten Fehler
- 26. Wie Sie WLTrusteerInternal.init in IBM MobileFirst deaktivieren
- 27. ibm mobilefirst hybrid app mit sql adapter
- 28. IBM Mobilefirst Cli-Installer 7.0.0 Zip-Datei
- 29. HideSplashScreen Methode in IBM MobileFirst v8 veraltete
- 30. AngularJS 1.5 Fehler Bootstrap IBM Mobilefirst