class User : Parcelable
Represents a user and the actions a user can take. Actions are grouped under auth, agreements and profile,
User(parcel: Parcel) User(token: UserToken, isPersistable: Boolean)
Represents a user and the actions a user can take. Actions are grouped under auth, agreements and profile, |
val agreements: Agreements |
|
val auth: Auth |
|
val isPersistable: Boolean |
|
val profile: Profile |
|
val userId: UserId |
fun bind(builder: Builder, urls: List<String>): Builder fun bind(builder: Builder, urls: List<String>, allowNonHttps: Boolean, allowNonWhitelistedDomains: Boolean): Builder
Bind this session to an OkHttpClient. This will add an interceptor and override any authenticators already defined. Any requests not matching the host will be denied. |
|
fun describeContents(): Int |
|
fun isActive(): Boolean |
|
fun logout(callback: ResultCallback<NoValue>?): Unit
Destroys the current session and removes it's access tokens from Schibsted account. Attempting to use this session afterwards will cause errors |
|
fun persist(context: Context): Unit
Manually persist a user session so that it can be resumed at a later point. |
|
fun writeToParcel(parcel: Parcel, flags: Int): Unit |
val CREATOR: Creator<User> |
fun fromSessionCode(code: String, redirectUri: String, isPersistable: Boolean, codeVerifier: String? = null, callback: ResultCallback<User>, scopes: Array<String>?): Unit |
|
fun removeAllSession(appContext: Context): Unit
Clears all stored user sessions |
|
fun removeLastSession(appContext: Context): Unit
Removes the last user's session, causing it not be be able to be resumed. If your purpose is to to log out the user, call User.logout instead. |
|
fun removeSession(appContext: Context, userId: String): Unit
Removes a user's session, causing it not be be able to be resumed. If your purpose is to to log out the user, call User.logout instead. |
|
fun resumeLastSession(appContext: Context, callback: ResultCallback<User>): Unit
Resumes the last active user's session. This verifies that the user has accepted terms and that all required fields are provided. If this fails, onError will be called |
|
fun resumeSession(appContext: Context, userId: String, callback: ResultCallback<User>): Unit
Resumes the last active user's session. This verifies that the user has accepted terms and that all required fields are provided. If this fails, onError will be called. If no session is found for the user id, onError will be called. |