JVM base OAuth2 client library written in Kotlin for RIDI account authorization
This library is distributed by jitpack.
You should add jitpack maven repository to build.gradle file of your project.
repositories {
...
maven { url 'https://jitpack.io' }
...
}
Then you can include this library by adding dependency script to build.gradle file of your project.
dependencies {
...
implementation 'com.github.ridi:kotlin-oauth2:<version>'
...
}
If you want to use this library on your Android project using ProGuard, add the following line to your ProGuard rules file.
-keepclassmembers class com.ridi.oauth2.TokenResponse { *; }
Create Authorization
object with your client id and client secret.
val authorization = Authorization("client-id", "client-secret")
You can get Single<TokenResponse>
object by following examples.
authorization.requestPasswordGrantAuthorization("username", "password")
authorization.refreshAccessToken("refresh-token")