Skip to content

Commit cb43f70

Browse files
Psg 4903 use repo templates (#17)
* PSG-4903 update licensefile * PSG-4903 update cargo.toml * PSG-4903 update readme * PSG-4903 bump patch version * PSG-4903 remove import statement from initialize section
1 parent a4f23e1 commit cb43f70

File tree

3 files changed

+92
-22
lines changed

3 files changed

+92
-22
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "passage_flex"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2021"
55
authors = ["[email protected]"]
6-
description = "Provides verification of server-side authentication for applications using Passage Passkey Flex"
7-
homepage = "https://github.com/passageidentity/passage-flex-rust"
6+
description = "Passkey Flex for Rust - Add passkey authentication to your own Rust authentication flows with Passage by 1Password"
7+
homepage = "https://docs.passage.id/flex"
88
repository = "https://github.com/passageidentity/passage-flex-rust"
99
readme = "README.md"
1010
license = "MIT"

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Passage by 1Password
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+68-19
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,65 @@
1-
# passage_flex
1+
![passage-flex-rust](https://storage.googleapis.com/passage-docs/github-md-assets/passage-flex-rust.png)
22

3-
<img src="https://storage.googleapis.com/passage-docs/passage-logo-gradient.svg" alt="Passage logo" style="width:250px;"/>
3+
![crates.io](https://img.shields.io/crates/v/passage_flex.svg) [![Rust](https://img.shields.io/badge/Rust-%23000000.svg?e&logo=rust&logoColor=white)](#) ![GitHub License](https://img.shields.io/github/license/passageidentity/passage-flex-rust)
4+
![Static Badge](https://img.shields.io/badge/Built_by_1Password-grey?logo=1password)
45

5-
![crates.io](https://img.shields.io/crates/v/passage_flex.svg)
6+
## About
67

7-
Passkey Flex provides passkey support for existing authentication systems. It abstracts the complexities of native passkey APIs and provides a simple, clean solution to take your authentication to the next level.
8+
[Passage by 1Password](https://1password.com/product/passage) unlocks the passwordless future with a simpler, more secure passkey authentication experience. Passage handles the complexities of the [WebAuthn API](https://blog.1password.com/what-is-webauthn/), and allows you to implement passkeys with ease.
89

9-
The `passage_flex` Rust crate allows for verification of server-side authentication for applications using [Passage Passkey Flex](https://passage.id).
10+
Use [Passkey Flex](https://docs.passage.id/flex) to add passkeys to an existing authentication experience.
1011

11-
For full documentation, visit the [Passkey Flex Docs](https://docs-v2.passage.id/flex) and [Docs.rs](https://docs.rs/passage_flex/latest/passage_flex/) pages.
12+
Use [Passkey Complete](https://docs.passage.id/complete) as a standalone passwordless auth solution.
1213

13-
## Installation
14+
Use [Passkey Ready](https://docs.passage.id/passkey-ready) to determine if your users are ready for passkeys.
1415

15-
Install this crate using cargo:
16+
### In passage-flex-rust
17+
18+
Use passage-flex-rust to implement Passkey Flex into your Rust backend to authenticate requests and manage users.
19+
20+
| Product | Compatible |
21+
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
22+
| ![Passkey Flex](https://storage.googleapis.com/passage-docs/github-md-assets/passage-passkey-flex-icon.png) Passkey **Flex** ||
23+
| ![Passkey Complete](https://storage.googleapis.com/passage-docs/github-md-assets/passage-passkey-complete-icon.png) Passkey **Complete** | ✖️ For Passkey Complete, check out the [Passkey Complete APIs](https://docs.passage.id/complete/backend-sdks) |
24+
| ![Passkey Ready](https://storage.googleapis.com/passage-docs/github-md-assets/passage-passkey-ready-icon.png) Passkey **Ready** | ✖️ For Passkey Ready, check out [Authentikit](https://www.npmjs.com/package/@passageidentity/authentikit) |
25+
26+
## Getting Started
27+
28+
### Check Prerequisites
29+
30+
<p>
31+
You'll need a free Passage account and a Passkey Flex app set up in <a href="https://console.passage.id/">Passage Console</a> to get started. <br />
32+
<sub><a href="https://docs.passage.id/home#passage-console">Learn more about Passage Console →</a></sub>
33+
</p>
34+
35+
### Install
1636

1737
```shell
1838
cargo add passage_flex
1939
```
2040

21-
## Create a PassageFlex instance
22-
23-
A Passage AppID and API key are required. An App and AppID can be created in the Passage Console, and an API key can be created under your Application Settings. This API key grants access to the Passage management APIs to get and update information about users. This API key must be protected and stored in an appropriate secure storage location. It should never be hard-coded in the repository.
41+
### Import
2442

2543
```rust
2644
use passage_flex::PassageFlex;
45+
```
46+
47+
### Initialize
2748

49+
```rust
2850
let passage_flex = PassageFlex::new(
29-
std::env::var("PASSAGE_APP_ID").unwrap(),
30-
std::env::var("PASSAGE_API_KEY").unwrap(),
51+
std::env::var("YOUR_PASSAGE_APP_ID").unwrap(),
52+
std::env::var("YOUR_PASSAGE_API_KEY").unwrap(),
3153
);
3254
```
3355

34-
## Retrieve app info
56+
### Go Passwordless
57+
58+
Find more details about Passkey Flex on our [Passkey Flex Documentation](https://docs.passage.id/flex) and [Docs.rs](https://docs.rs/passage_flex/latest/passage_flex/) pages.
59+
60+
## API Reference
61+
62+
### Retrieve App Info
3563

3664
To retrieve information about the app, use the `get_app` method.
3765

@@ -47,7 +75,7 @@ let app_info = passage_flex.get_app().await.unwrap();
4775
println!("{}", app_info.auth_origin);
4876
```
4977

50-
## Create a registration transaction
78+
### Create a Registration Transaction
5179

5280
To create a transaction to start a user passkey registration, use the `create_register_transaction` method.
5381

@@ -69,7 +97,7 @@ let transaction = passage_flex
6997
.unwrap();
7098
```
7199

72-
## Create an authentication transaction
100+
### Create an Authentication Transaction
73101

74102
To create a transaction to start a user passkey authentication, use the `create_authenticate_transaction` method.
75103

@@ -89,7 +117,7 @@ let transaction = passage_flex
89117
.unwrap();
90118
```
91119

92-
## Verify a nonce
120+
## Verify a Nonce
93121

94122
To verify a nonce that you received from the end of of passkey registration or authentication ceremony, use the `verify_nonce` method.
95123

@@ -114,7 +142,7 @@ match passage_flex.verify_nonce(nonce).await {
114142
}
115143
```
116144

117-
## Retrieve user info
145+
## Retrieve User Info
118146

119147
To retrieve information about a user by their external ID -- which is the unique, immutable ID you supply to associate the Passage user with your user -- use the `get_user` method.
120148

@@ -156,7 +184,7 @@ for device in passkey_devices {
156184
}
157185
```
158186

159-
## Revoke a user's passkey device
187+
## Revoke a User's Passkey Device
160188

161189
To revoke a user's passkey device, use the `revoke_device` method.
162190

@@ -191,3 +219,24 @@ for device in passkey_devices {
191219
}
192220
}
193221
```
222+
223+
## Support & Feedback
224+
225+
We are here to help! Find additional docs, the best ways to get in touch with our team, and more within our [support resources](https://github.com/passageidentity/.github/blob/main/SUPPORT.md).
226+
227+
<br />
228+
229+
---
230+
231+
<p align="center">
232+
<picture>
233+
<source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-dark.png">
234+
<source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-light.png">
235+
<img alt="Passage by 1Password Logo" src="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-light.png">
236+
</picture>
237+
</p>
238+
239+
<p align="center">
240+
<sub>Passage is a product by <a href="https://1password.com/product/passage">1Password</a>, the global leader in access management solutions with nearly 150k business customers.</sub><br />
241+
<sub>This project is licensed under the MIT license. See the <a href="LICENSE">LICENSE</a> file for more info.</sub>
242+
</p>

0 commit comments

Comments
 (0)