Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Liftric/auth
Browse files Browse the repository at this point in the history
  • Loading branch information
gaebel committed Aug 31, 2020
2 parents 90364d0 + 53f5547 commit 5fd4ff4
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.liftric.base
package com.liftric.auth.base

actual internal class Environment {
actual companion object {
actual fun variable(value: String): String? {
return System.getenv(value)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.liftric
package com.liftric.auth

import com.liftric.base.*
import com.liftric.auth.base.*

interface Auth {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.liftric
package com.liftric.auth

import com.liftric.base.*
import com.liftric.auth.base.*
import io.ktor.client.*
import io.ktor.client.features.*
import io.ktor.client.request.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.liftric
package com.liftric.auth

import com.liftric.base.Header
import com.liftric.base.Region
import com.liftric.auth.base.Header
import com.liftric.auth.base.Region
import io.ktor.http.HeadersBuilder

/**
Expand Down Expand Up @@ -33,4 +33,4 @@ class Configuration(origin: String, region: Region, val clientId: String) {
builder.append(it.key, it.value)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.liftric.base
package com.liftric.auth.base

object Header {
const val Authority = "authority"
Expand Down Expand Up @@ -59,4 +59,4 @@ enum class Region(val code: String) {
euNorth1("eu-north-1"),
meSouth1("me-south-1"),
saEast1("sa-east-1")
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.liftric.base
package com.liftric.auth.base

expect internal class Environment() {
companion object {
Expand All @@ -8,4 +8,4 @@ expect internal class Environment() {
*/
fun variable(value: String): String?
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.liftric.base
package com.liftric.auth.base

import kotlinx.serialization.Serializable

Expand Down Expand Up @@ -66,4 +66,4 @@ data class UserAttribute(
internal data class UpdateUserAttributes(
val AccessToken: String,
val UserAttributes: List<UserAttribute>
)
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.liftric.base
package com.liftric.auth.base

import kotlinx.serialization.Serializable

Expand All @@ -11,8 +11,8 @@ data class RequestError(val __type: String, val message: String)

@Serializable
data class SignInResponse(
val AuthenticationResult: AuthenticationResult,
val ChallengeParameters: Map<String, String> = mapOf()
val AuthenticationResult: AuthenticationResult,
val ChallengeParameters: Map<String, String> = mapOf()
)

@Serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.liftric.base
package com.liftric.auth.base

class Result<out T> constructor(val value: Any?) {
val isSuccess: Boolean get() = value !is Failure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.liftric.base
package com.liftric.auth.base

import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerializationStrategy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.liftric
package com.liftric.auth

import com.liftric.base.*
import com.liftric.base.Environment
import com.liftric.auth.base.*
import com.liftric.auth.base.Environment
import com.liftric.auth.base.Region
import kotlinx.coroutines.delay
import kotlin.test.*
import kotlinx.coroutines.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.liftric.base
package com.liftric.auth.base

import platform.Foundation.NSProcessInfo

Expand All @@ -8,4 +8,4 @@ actual internal class Environment actual constructor() {
return NSProcessInfo().environment[value].toString()
}
}
}
}
2 changes: 1 addition & 1 deletion auth/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="com.liftric"/>
<manifest package="com.liftric.auth"/>

0 comments on commit 5fd4ff4

Please sign in to comment.