Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GETEDUROAM-74: Handle webview profile type #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ data class Profile(
val redirect: String? = null,
val type: Type = Profile.Type.unknown,
@SerialName("letswifi_endpoint")
val letswifiEndpoint: String? = null
val letswifiEndpoint: String? = null,
@SerialName("webview_endpoint")
val webviewEndpoint: String? = null
) : Parcelable {

@Serializable
Expand All @@ -31,6 +33,8 @@ data class Profile(
letswifi,
@SerialName("eap-config")
eapConfig,
@SerialName("webview")
webview,
unknown
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ class SelectProfileViewModel @Inject constructor(
inProgress = false,
openUrlInBrowser = profile.redirect
)
} else if (profile.type == Profile.Type.webview && !profile.webviewEndpoint.isNullOrEmpty()) {
uiState = uiState.copy(
inProgress = false,
openUrlInBrowser = profile.webviewEndpoint
)
} else {
Timber.w("Missing EAP endpoint in profile configuration. Cannot continue with selected profile.")
uiState = uiState.copy(
Expand Down
Loading