Skip to content
Snippets Groups Projects
Commit 7319eb2f authored by John's avatar John
Browse files

Remove email and password auth since no longer supported

parent 6d00dbb9
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -93,7 +93,7 @@
<string name="url_gitlab">https://gitlab.com/</string>
<string name="user_hint">Username or Email</string>
<string name="password_hint">Password</string>
<string name="token_hint">Private or personal access token</string>
<string name="token_hint">Personal Access token</string>
<string name="login_activity">Login</string>
<string name="login_progress_dialog">Logging in. Please wait</string>
<string name="advanced_login">Advanced Login</string>
Loading
Loading
@@ -107,8 +107,9 @@
<string name="not_a_valid_private_token">Not a valid private token</string>
<string name="realm_message">A username and password are being requested by the server.\nThe server says: \"%1$s\"</string>
<string name="already_logged_in">This account is already logged in</string>
<string name="open_login_page">Web Login To Fetch Private Token</string>
<string name="open_login_page_for_personal_access_token">Web Login To Fetch Personal Access Token</string>
<string name="access_token_info_title">Personal Access Token</string>
<string name="access_token_info_message">In order to log in to GitLab, you need to create a personal access token for the app to use. This is more secure than inputting your username and password, since those values could be tracked or used maliciously. You can create a personal access token under your profile preferences. Please select "api" as the scope of this token. You can leave "expires at" blank to never have the token expire.</string>
<string name="create_personal_access_token">Create Personal Access Token</string>
 
<!-- Error messages -->
<string name="connection_error">Connection failed</string>
Loading
Loading
@@ -525,5 +526,6 @@
<string name="no_tags">No tags</string>
<string name="fetching_some_details">Fetching some details</string>
 
<string name="title_activity_fullscreen_image">FullscreenImageActivity</string>
<string name="welcome">Welcome to LabCoat</string>
<string name="welcome_message">We support GitLab.com, as well as any GitLab server running GitLab version 9.0 or later</string>
</resources>
\ No newline at end of file
Loading
Loading
@@ -14,7 +14,7 @@
<item name="alertDialogTheme">@style/AppDialogTheme</item>
</style>
 
<style name="Activity" parent="AppTheme"/>
<style name="Activity" parent="AppTheme" />
 
<style name="Activity.Login">
<item name="android:windowBackground">?attr/colorPrimary</item>
Loading
Loading
@@ -72,4 +72,10 @@
<item name="android:foreground">?attr/selectableItemBackground</item>
</style>
 
<style name="Text" />
<style name="Text.MonoRegular">
<item name="android:fontFamily">@font/roboto_mono_regular</item>
</style>
</resources>
\ No newline at end of file
Loading
Loading
@@ -3,12 +3,9 @@ package com.commit451.gitlab
import com.commit451.gitlab.api.GitLabFactory
import com.commit451.gitlab.api.GitLabService
import com.commit451.gitlab.api.OkHttpClientFactory
import com.commit451.gitlab.api.request.SessionRequest
import com.commit451.gitlab.model.Account
import okhttp3.logging.HttpLoggingInterceptor
import org.junit.Assert
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import retrofit2.Response
 
/**
Loading
Loading
@@ -27,16 +24,8 @@ object TestUtil {
gitlabClientBuilder.addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
}
val gitLab = GitLabFactory.create(account, gitlabClientBuilder.build())
val request = SessionRequest()
request.login = "TestAllTheThings"
request.password = "testing123"
val loginResponse = gitLab
.login(request)
.blockingGet()
assertTrue(loginResponse.isSuccessful)
assertNotNull(loginResponse.body()!!.privateToken)
//attach the newly retrieved private token
account.privateToken = loginResponse.body()!!.privateToken
account.privateToken = "UjssYTJLWy7CFs7G8sS_"
return gitLab
}
 
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'com.github.Commit451:updatewrapper:1.1.2'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment