-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add packages/ion_identity_client
- Loading branch information
ice-tychon
committed
Aug 13, 2024
1 parent
670ca61
commit 430b534
Showing
51 changed files
with
1,126 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flutter 3.24.0-stable |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-if class androidx.credentials.CredentialManager | ||
-keep class androidx.credentials.playservices.** { | ||
*; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
migrate_working_dir/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
/pubspec.lock | ||
**/doc/api/ | ||
.dart_tool/ | ||
build/ |
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,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d" | ||
channel: "stable" | ||
|
||
project_type: package |
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,3 @@ | ||
## 0.0.1 | ||
|
||
* This version adds Sign Up with Passkeys. |
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 @@ | ||
TODO: Add your license here. |
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,39 @@ | ||
<!-- | ||
This README describes the package. If you publish this package to pub.dev, | ||
this README's contents appear on the landing page for your package. | ||
For information about how to write a good package README, see the guide for | ||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | ||
For general information about developing packages, see the Dart guide for | ||
[creating packages](https://dart.dev/guides/libraries/create-library-packages) | ||
and the Flutter guide for | ||
[developing packages and plugins](https://flutter.dev/developing-packages). | ||
--> | ||
|
||
TODO: Put a short description of the package here that helps potential users | ||
know whether this package might be useful for them. | ||
|
||
## Features | ||
|
||
TODO: List what your package can do. Maybe include images, gifs, or videos. | ||
|
||
## Getting started | ||
|
||
TODO: List prerequisites and provide or point to information on how to | ||
start using the package. | ||
|
||
## Usage | ||
|
||
TODO: Include short and useful examples for package users. Add longer examples | ||
to `/example` folder. | ||
|
||
```dart | ||
const like = 'sample'; | ||
``` | ||
|
||
## Additional information | ||
|
||
TODO: Tell users more about the package: where to find more information, how to | ||
contribute to the package, how to file issues, what response they can expect | ||
from the package authors, and more. |
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,9 @@ | ||
include: package:very_good_analysis/analysis_options.yaml | ||
|
||
analyzer: | ||
errors: | ||
avoid_dynamic_calls: ignore | ||
avoid_positional_boolean_parameters: ignore | ||
lines_longer_than_80_chars: ignore | ||
public_member_api_docs: ignore | ||
unnecessary_library_directive: ignore |
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 @@ | ||
library ion_identity_client; | ||
|
||
export 'src/auth/ion_auth.dart'; | ||
export 'src/ion_api_client.dart'; | ||
export 'src/ion_client_config.dart'; |
15 changes: 15 additions & 0 deletions
15
packages/ion_identity_client/lib/src/auth/dtos/authentication.dart
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,15 @@ | ||
import 'package:ion_identity_client/src/utils/types.dart'; | ||
|
||
class Authentication { | ||
Authentication({ | ||
required this.token, | ||
}); | ||
|
||
factory Authentication.fromJson(JsonObject map) { | ||
return Authentication( | ||
token: map['token'] as String, | ||
); | ||
} | ||
|
||
final String token; | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/ion_identity_client/lib/src/auth/dtos/credential.dart
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,21 @@ | ||
import 'package:ion_identity_client/src/utils/types.dart'; | ||
|
||
class Credential { | ||
Credential({ | ||
required this.uuid, | ||
required this.kind, | ||
required this.name, | ||
}); | ||
|
||
factory Credential.fromJson(JsonObject map) { | ||
return Credential( | ||
uuid: map['uuid'] as String, | ||
kind: map['kind'] as String, | ||
name: map['name'] as String, | ||
); | ||
} | ||
|
||
final String uuid; | ||
final String kind; | ||
final String name; | ||
} |
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,7 @@ | ||
export 'credential.dart'; | ||
export 'register_complete_request.dart'; | ||
export 'register_complete_response.dart'; | ||
export 'register_init_request.dart'; | ||
export 'signed_challenge.dart'; | ||
export 'user.dart'; | ||
export 'wallet.dart'; |
30 changes: 30 additions & 0 deletions
30
packages/ion_identity_client/lib/src/auth/dtos/register_complete_request.dart
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,30 @@ | ||
import 'package:ion_identity_client/src/auth/dtos/signed_challenge.dart'; | ||
import 'package:ion_identity_client/src/utils/types.dart'; | ||
|
||
class RegisterCompleteRequest { | ||
RegisterCompleteRequest({ | ||
required this.appId, | ||
required this.signedChallenge, | ||
required this.temporaryAuthenticationToken, | ||
}); | ||
|
||
factory RegisterCompleteRequest.fromJson(JsonObject json) { | ||
return RegisterCompleteRequest( | ||
appId: json['appId'] as String, | ||
signedChallenge: SignedChallenge.fromJson(json['signedChallenge'] as JsonObject), | ||
temporaryAuthenticationToken: json['temporaryAuthenticationToken'] as String, | ||
); | ||
} | ||
|
||
final String appId; | ||
final SignedChallenge signedChallenge; | ||
final String temporaryAuthenticationToken; | ||
|
||
JsonObject toJson() { | ||
return { | ||
'appId': appId, | ||
'signedChallenge': signedChallenge.toJson(), | ||
'temporaryAuthenticationToken': temporaryAuthenticationToken, | ||
}; | ||
} | ||
} |
Oops, something went wrong.