Commit 44e8c99a authored by Lucio Maciel's avatar Lucio Maciel

Fix crashes on login with SAML, Oauth and CAS

parent 34f58c85
...@@ -68,6 +68,7 @@ class LoginOptionsPresenter @Inject constructor( ...@@ -68,6 +68,7 @@ class LoginOptionsPresenter @Inject constructor(
fun toLoginWithEmail() = navigator.toLogin(currentServer) fun toLoginWithEmail() = navigator.toLogin(currentServer)
fun authenticateWithOauth(oauthToken: String, oauthSecret: String) { fun authenticateWithOauth(oauthToken: String, oauthSecret: String) {
setupConnectionInfo(currentServer)
credentialToken = oauthToken credentialToken = oauthToken
credentialSecret = oauthSecret credentialSecret = oauthSecret
loginMethod = AuthenticationEvent.AuthenticationWithOauth loginMethod = AuthenticationEvent.AuthenticationWithOauth
...@@ -75,12 +76,14 @@ class LoginOptionsPresenter @Inject constructor( ...@@ -75,12 +76,14 @@ class LoginOptionsPresenter @Inject constructor(
} }
fun authenticateWithCas(casToken: String) { fun authenticateWithCas(casToken: String) {
setupConnectionInfo(currentServer)
credentialToken = casToken credentialToken = casToken
loginMethod = AuthenticationEvent.AuthenticationWithCas loginMethod = AuthenticationEvent.AuthenticationWithCas
doAuthentication(TYPE_LOGIN_CAS) doAuthentication(TYPE_LOGIN_CAS)
} }
fun authenticateWithSaml(samlToken: String) { fun authenticateWithSaml(samlToken: String) {
setupConnectionInfo(currentServer)
credentialToken = samlToken credentialToken = samlToken
loginMethod = AuthenticationEvent.AuthenticationWithSaml loginMethod = AuthenticationEvent.AuthenticationWithSaml
doAuthentication(TYPE_LOGIN_SAML) doAuthentication(TYPE_LOGIN_SAML)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment