{"id":20823406,"url":"https://github.com/ryunen344/webauthnkt","last_synced_at":"2025-05-07T16:47:41.491Z","repository":{"id":222682503,"uuid":"729132404","full_name":"RyuNen344/WebAuthnKt","owner":"RyuNen344","description":"Pure WebAuthn JSON Library","archived":false,"fork":false,"pushed_at":"2024-10-30T00:57:30.000Z","size":680,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T02:50:03.881Z","etag":null,"topics":["android","fido2","kotlin","kotlinx-serialization","moshi","webauthn"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RyuNen344.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-08T13:45:02.000Z","updated_at":"2024-10-30T00:57:33.000Z","dependencies_parsed_at":"2024-05-06T01:40:31.978Z","dependency_job_id":"f3326493-c835-4e2a-b2d0-15331a427e69","html_url":"https://github.com/RyuNen344/WebAuthnKt","commit_stats":null,"previous_names":["ryunen344/webauthnkt"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyuNen344%2FWebAuthnKt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyuNen344%2FWebAuthnKt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyuNen344%2FWebAuthnKt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyuNen344%2FWebAuthnKt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyuNen344","download_url":"https://codeload.github.com/RyuNen344/WebAuthnKt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225097115,"owners_count":17420389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","fido2","kotlin","kotlinx-serialization","moshi","webauthn"],"created_at":"2024-11-17T22:18:27.385Z","updated_at":"2024-11-17T22:18:28.155Z","avatar_url":"https://github.com/RyuNen344.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebAuthnKt\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.ryunen344.webauthn/webauthn2-json-moshi?style=plastic)](https://central.sonatype.com/search?q=io.github.ryunen344.webauthn)\n[![jitpack](https://jitpack.io/v/RyuNen344/WebAuthnKt.svg)](https://jitpack.io/#RyuNen344/WebAuthnKt)\n\nPure pre-implementation\nof [Web Authentication: An API for accessing Public Key Credentials Level 2](https://www.w3.org/TR/webauthn-2/)\u003c/br\u003e\nThis library allows you to use WebAuthn JSON without self-implementation.\u003c/br\u003e\nAssume that uses this library with [CredentialManager](https://developer.android.com/reference/android/credentials/CredentialManager)\u003c/br\u003e\nBut your app doesn't need to depend on GMS APIs.\u003c/br\u003e\nInspired by [webauthn-json](https://github.com/github/webauthn-json)\u003c/br\u003e\n\n### Pre-implemented JSONs\n\n- [PublicKeyCredentialDescriptor](webauthn2-json-core/src/main/java/io/github/ryunen344/webauthn2/json/core/PublicKeyCredentialDescriptor.kt)\n- [AuthenticatorAttestationResponse](webauthn2-json-core/src/main/java/io/github/ryunen344/webauthn2/json/core/AuthenticatorResponse.kt)\n- [AuthenticatorAssertionResponse](webauthn2-json-core/src/main/java/io/github/ryunen344/webauthn2/json/core/AuthenticatorResponse.kt)\n- [CredentialCreationOptions](webauthn2-json-core/src/main/java/io/github/ryunen344/webauthn2/json/core/PublicKeyCredentialCreationOptions.kt)\n- [CredentialRequestOptions](webauthn2-json-core/src/main/java/io/github/ryunen344/webauthn2/json/core/PublicKeyCredentialRequestOptions.kt)\n\n### Supported Serialization Library\n- [Moshi](https://github.com/square/moshi)\n- [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization)\n\n## Setup\n\n### MavenCentral\n\nSet your `settings.gradle` like below\n\n```groovy:settings.gradle\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n```\n\nSet your `build.gradle` like below\n\n```groovy:settings.gradle\ndependencies {\n    // moshi\n    implementation 'io.github.ryunen344.webauthn:webauthn2-json-moshi:${version}'\n    \n    // kotlinx.serialization\n    implementation 'io.github.ryunen344.webauthn:webauthn2-json-serialization:${version}'\n}\n```\n\n### JitPack\n\nSet your `settings.gradle` like below\n\n```groovy:settings.gradle\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\nSet your `build.gradle` like below\n\n```groovy:settings.gradle\ndependencies {\n    // moshi\n    implementation 'com.github.RyuNen344.WebAuthnKt:webauthn2-json-moshi:${version}'\n    \n    // kotlinx.serialization\n    implementation 'com.github.RyuNen344.WebAuthnKt:webauthn2-json-serialization:${version}'\n}\n```\n\n## Usage\n\n### Moshi\n\nyou need to use WebAuthnAdapterHelper to setup moshi\n\n```kotlin \nval moshi = Moshi.Builder().apply(WebAuthnAdapterHelper()::setup).build()\nval adapter = moshi.adapter(PublicKeyCredentialCreationOptions::class.java)\nval json = adapter.fromJson(PublicKeyCredentialCreationOptionsJSON)\n```\n\n### kotlinx.serialization\n\nyou can use serializers, directly\n\n```kotlin\nJson {}.encodeToString(\n    PublicKeyCredentialRequestOptions.serializer(),\n    PublicKeyCredentialRequestOptionsJSON\n)\n```\n\n# License\n\n```\nCopyright 2023 RyuNen344\nCopyright 2015 Square, Inc.\nCopyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   https://www.apache.org/licenses/LICENSE-2.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryunen344%2Fwebauthnkt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryunen344%2Fwebauthnkt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryunen344%2Fwebauthnkt/lists"}