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

Update doc for AppIntegrityCallback #380

Merged
merged 1 commit into from
Jan 4, 2024
Merged
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
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 ForgeRock. All rights reserved.
* Copyright (c) 2023-2024 ForgeRock. All rights reserved.
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
Expand Down Expand Up @@ -38,7 +38,7 @@ import kotlin.time.toDuration
private val TAG = AppIntegrityCallback::class.java.simpleName

/**
* Callback to collect the device binding information
* Callback to collect integrity token.
*/
open class AppIntegrityCallback : NodeAware, AbstractCallback {

Expand All @@ -55,8 +55,14 @@ open class AppIntegrityCallback : NodeAware, AbstractCallback {
val cache = ConcurrentHashMap<String, StandardIntegrityTokenProvider>()
}

/**
* The [Node] that associate with this Callback
*/
private lateinit var node: Node

/**
* The request type
*/
lateinit var requestType: RequestType
private set

Expand Down Expand Up @@ -93,7 +99,7 @@ open class AppIntegrityCallback : NodeAware, AbstractCallback {

/**
* Input the Client Error to the server
* @param value DeviceBind ErrorType .
* @param value Error String.
*/
fun setClientError(value: String) {
super.setValue(value, 1)
Expand Down Expand Up @@ -128,7 +134,7 @@ open class AppIntegrityCallback : NodeAware, AbstractCallback {
}

/**
* Bind the device.
* Request the integrity token
*
* @param context The Application Context
*/
Expand Down Expand Up @@ -222,6 +228,10 @@ open class AppIntegrityCallback : NodeAware, AbstractCallback {

}

/**
* The Request Type, please see https://developer.android.com/google/play/integrity/overview for
* detail.
*/
enum class RequestType {
CLASSIC,
STANDARD;
Expand Down
Loading