forked from authgear/authgear-sdk-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close change password page on success authgear#183
- Loading branch information
Showing
13 changed files
with
225 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
sdk/src/main/java/com/oursky/authgear/OnOpenSettingsActionListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.oursky.authgear | ||
|
||
interface OnOpenSettingsActionListener { | ||
fun onFinished() | ||
fun onFailed(throwable: Throwable) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.oursky.authgear | ||
|
||
enum class SettingsAction(val raw: String) { | ||
CHANGE_PASSWORD("change_password") | ||
} |
34 changes: 34 additions & 0 deletions
34
sdk/src/main/java/com/oursky/authgear/SettingsActionOptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.oursky.authgear | ||
|
||
import com.oursky.authgear.oauth.OidcAuthenticationRequest | ||
|
||
data class SettingsActionOptions @JvmOverloads constructor( | ||
var redirectURI: String, | ||
/** | ||
* WeChat redirect uri is needed when integrating WeChat login | ||
* The wechatRedirectURI will be called when user click the login with WeChat button | ||
*/ | ||
var wechatRedirectURI: String? = null, | ||
/** | ||
* Theme override | ||
*/ | ||
var colorScheme: ColorScheme? = null, | ||
var uiLocales: List<String>? = null, | ||
) | ||
|
||
internal fun SettingsActionOptions.toRequest(action: SettingsAction, idTokenHint: String, loginHint: String): OidcAuthenticationRequest { | ||
return OidcAuthenticationRequest( | ||
redirectUri = this.redirectURI, | ||
responseType = "settings_action", | ||
scope = listOf("openid", "https://authgear.com/scopes/full-access"), | ||
isSsoEnabled = false, | ||
prompt = null, | ||
loginHint = loginHint, | ||
idTokenHint = idTokenHint, | ||
uiLocales = this.uiLocales, | ||
colorScheme = this.colorScheme, | ||
wechatRedirectURI = this.wechatRedirectURI, | ||
page = null, | ||
settingsAction = action.raw, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters