Skip to content

Commit

Permalink
release 1.14.6: fix login issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick committed May 20, 2022
1 parent a38e47b commit 8cec48b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ boolean isDev = false

String libName = 'KotlinInside'
String libDevVersion = isDev ? '-SNAPSHOT' : ''
String libVersion = "1.14.5$libDevVersion"
String libVersion = "1.14.6$libDevVersion"
String libDesc = 'Unofficial DCInside API written in Kotlin'

group = 'be.zvz'
Expand Down Expand Up @@ -73,8 +73,8 @@ dependencies {


//Jackson
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.2.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.3'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.3'

//FlexMark
implementation group: 'com.vladsch.flexmark', name: 'flexmark', version: '0.62.2'
Expand Down
14 changes: 8 additions & 6 deletions src/main/kotlin/be/zvz/kotlininside/security/Auth.kt
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,16 @@ class Auth {
@Throws(HttpException::class)
fun login(user: User): Session {
if (user !is Anonymous) {
val option = Request.getDefaultOption()
.addMultipartParameter("user_id", user.id)
.addMultipartParameter("user_pw", user.password)
.addMultipartParameter("mode", "login_normal")
.addMultipartParameter("client_token", fcmToken)
val option = HttpInterface.Option()
.setUserAgent("com.dcinside.mobileapp")
.addHeader("Referer", "http://www.dcinside.com")
.addBodyParameter("client_token", fcmToken)
.addBodyParameter("mode", "login_quick")
.addBodyParameter("user_id", user.id)
.addBodyParameter("user_pw", user.password)

val json = JsonBrowser.parse(
KotlinInside.getInstance().httpInterface.upload(
KotlinInside.getInstance().httpInterface.post(
ApiUrl.Auth.LOGIN,
option
)
Expand Down

0 comments on commit 8cec48b

Please sign in to comment.