mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 02:01:36 +03:00
Merge branch 'main' into adamve/unify_set_device_info
This commit is contained in:
commit
6feefba23e
@ -408,7 +408,7 @@ class FidoManager(
|
||||
(credentialData.user["id"] as ByteArray).asString(),
|
||||
credentialData.user["name"] as String,
|
||||
publicKeyCredentialDescriptor = credentialData.credentialId,
|
||||
displayName = credentialData.user["displayName"] as String,
|
||||
displayName = credentialData.user["displayName"] as String?,
|
||||
)
|
||||
}
|
||||
}.reduceOrNull { credentials, credentialList ->
|
||||
|
@ -31,7 +31,7 @@ data class FidoCredential(
|
||||
@SerialName("user_name")
|
||||
val userName: String,
|
||||
@SerialName("display_name")
|
||||
val displayName: String,
|
||||
val displayName: String?,
|
||||
@Transient
|
||||
val publicKeyCredentialDescriptor: Map<String, Any?> = emptyMap()
|
||||
)
|
||||
|
@ -53,13 +53,16 @@ data class SessionInfo(
|
||||
@SerialName("min_pin_length")
|
||||
val minPinLength: Int,
|
||||
@SerialName("force_pin_change")
|
||||
val forcePinChange: Boolean
|
||||
val forcePinChange: Boolean,
|
||||
@SerialName("remaining_disc_creds")
|
||||
val remainingDiscoverableCredentials: Int?
|
||||
) {
|
||||
constructor(infoData: InfoData) : this(
|
||||
Options(infoData),
|
||||
infoData.aaguid,
|
||||
infoData.minPinLength,
|
||||
infoData.forcePinChange
|
||||
infoData.forcePinChange,
|
||||
infoData.remainingDiscoverableCredentials
|
||||
)
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
@ -71,7 +74,10 @@ data class SessionInfo(
|
||||
if (options != other.options) return false
|
||||
if (!aaguid.contentEquals(other.aaguid)) return false
|
||||
if (minPinLength != other.minPinLength) return false
|
||||
return forcePinChange == other.forcePinChange
|
||||
if (forcePinChange != other.forcePinChange) return false
|
||||
if (remainingDiscoverableCredentials != other.remainingDiscoverableCredentials) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
@ -79,6 +85,7 @@ data class SessionInfo(
|
||||
result = 31 * result + aaguid.contentHashCode()
|
||||
result = 31 * result + minPinLength
|
||||
result = 31 * result + forcePinChange.hashCode()
|
||||
result = 31 * result + (remainingDiscoverableCredentials ?: 0)
|
||||
return result
|
||||
}
|
||||
|
||||
|
@ -93,12 +93,8 @@ Future<Widget> initialize() async {
|
||||
]),
|
||||
// this specifies the priority of sections to show when
|
||||
// the connected YubiKey does not support current section
|
||||
androidSectionPriority.overrideWithValue([
|
||||
Section.accounts,
|
||||
Section.fingerprints,
|
||||
Section.passkeys,
|
||||
Section.home
|
||||
]),
|
||||
androidSectionPriority.overrideWithValue(
|
||||
[Section.accounts, Section.fingerprints, Section.passkeys]),
|
||||
supportedThemesProvider.overrideWith(
|
||||
(ref) => ref.watch(androidSupportedThemesProvider),
|
||||
),
|
||||
|
@ -121,7 +121,7 @@ class AndroidCurrentSectionNotifier extends CurrentSectionNotifier {
|
||||
AndroidCurrentSectionNotifier(
|
||||
this._supportedSectionsByPriority,
|
||||
this._appContextHandler,
|
||||
) : super(Section.accounts);
|
||||
) : super(Section.home);
|
||||
|
||||
@override
|
||||
void setCurrentSection(Section section) {
|
||||
|
Loading…
Reference in New Issue
Block a user