Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
b67c3726
Commit
b67c3726
authored
Apr 23, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix setting oauth.
parent
c2aeacce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
build.gradle
app/build.gradle
+2
-2
LoginPresenter.kt
...droid/authentication/login/presentation/LoginPresenter.kt
+4
-3
OauthWebViewActivity.kt
...t/rocket/android/webview/oauth/ui/OauthWebViewActivity.kt
+1
-1
No files found.
app/build.gradle
View file @
b67c3726
...
...
@@ -13,8 +13,8 @@ android {
applicationId
"chat.rocket.android"
minSdkVersion
21
targetSdkVersion
versions
.
targetSdk
versionCode
201
3
versionName
"2.0.
3
"
versionCode
201
4
versionName
"2.0.
4
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled
true
}
...
...
app/src/main/java/chat/rocket/android/authentication/login/presentation/LoginPresenter.kt
View file @
b67c3726
...
...
@@ -26,11 +26,11 @@ private const val TYPE_LOGIN_USER_EMAIL = 0
private
const
val
TYPE_LOGIN_CAS
=
1
private
const
val
TYPE_LOGIN_OAUTH
=
2
private
const
val
TYPE_LOGIN_DEEP_LINK
=
3
private
const
val
SERVICE_NAME_FACEBOOK
=
"facebook"
private
const
val
SERVICE_NAME_GITHUB
=
"github"
private
const
val
SERVICE_NAME_GOOGLE
=
"google"
private
const
val
SERVICE_NAME_LINKEDIN
=
"linkedin"
private
const
val
SERVICE_NAME_GILAB
=
"gitlab"
private
const
val
SERVICE_NAME_FACEBOOK
=
"facebook"
class
LoginPresenter
@Inject
constructor
(
private
val
view
:
LoginView
,
...
...
@@ -279,9 +279,10 @@ class LoginPresenter @Inject constructor(
}
}
private
fun
getOauthClientId
(
listMap
:
List
<
Map
<
String
,
String
>>,
serviceName
:
String
):
String
?
{
private
fun
getOauthClientId
(
listMap
:
List
<
Map
<
String
,
Any
>>,
serviceName
:
String
):
String
?
{
return
listMap
.
find
{
map
->
map
.
containsValue
(
serviceName
)
}
?.
get
(
"appId"
)
?.
get
(
"clientId"
)
.
toString
()
}
private
suspend
fun
saveAccount
(
username
:
String
)
{
...
...
app/src/main/java/chat/rocket/android/webview/oauth/ui/OauthWebViewActivity.kt
View file @
b67c3726
...
...
@@ -30,7 +30,7 @@ private const val JSON_CREDENTIAL_SECRET = "credentialSecret"
const
val
INTENT_OAUTH_CREDENTIAL_TOKEN
=
"credential_token"
const
val
INTENT_OAUTH_CREDENTIAL_SECRET
=
"credential_secret"
// Shows a WebView to the user authenticate with
your Gitlab credentials
.
// Shows a WebView to the user authenticate with
its OAuth credential
.
class
OauthWebViewActivity
:
AppCompatActivity
()
{
private
lateinit
var
webPageUrl
:
String
private
lateinit
var
state
:
String
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment