Skip to content

Commit 254ab33

Browse files
authored
Docs Minor updates (#290)
## Fixes - Typos - Bad links - Wording
1 parent 4d5bbf1 commit 254ab33

File tree

8 files changed

+37
-38
lines changed

8 files changed

+37
-38
lines changed

docs/src/Actions/Response.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Response Sections
2828

2929
### `userPublicKey`
3030

31-
The public key for the user identifies the user for this session.
32-
If that user has a Frequency blockchain account (MSA), the MSA Id can be retrieved from Frequency using this key.
33-
Or in the case when it does not, the `payloads` section will contain the payload to create said MSA Id.
31+
The user for the current session is identified via the public key.
32+
If the user has a Frequency blockchain account (MSA), the user’s MSA Id can be retrieved from Frequency via this key.
33+
If the user does not have an account, the payloads section with contain the payload to create the MSA Id.
3434

3535
While the `userPublicKey` may change, the MSA Id will _always_ be the same for the same user account.
3636

@@ -48,7 +48,7 @@ These credentials follow the [DSNP Verifiable Credentials Specification](https:/
4848

4949
_Trust Model Note_: You may choose to just trust credentials issued by Frequency Access (or other SIWF-compatible services) given that the credential is fetched directly. These will have issuer `did:web:testnet.frequencyaccess.com` or `did:web:frequencyaccess.com`.
5050

51-
1. Check that the `credentialSubject.id` matches the `userPublicKey` following the [`did:key` Method from the W3C](https://w3c-ccg.github.io/did-method-key/#format)
51+
1. Check that the `credentialSubject.id` matches the `userPublicKey` following the [`did:key` Method from the W3C](https://w3c-ccg.github.io/did-key-spec/#format)
5252
- Example: `f6cL4wq1HUNx11TcvdABNf9UNXXoyH47mVUwT59tzSFRW8yDH` is the [SS58](https://docs.substrate.io/reference/address-formats/) version with prefix `90` of the hex address `0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d`. `0xef01d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d` is multicodec `sr25519-pub` hex which is multiformat `base58-btc` `z6QNzHod3tSSJbwo4e5xGDcnsndsR9WByZzPoCGdbv3sv1jJ`
5353
2. Fetch the issuer DID Document following the [`did:web` Method from the W3C](https://w3c-ccg.github.io/did-method-web/)
5454
- Production-Mainnet should always be `did:web:frequencyaccess.com` which resolves to `https://frequencyaccess.com/.well-known/did.json`
@@ -84,7 +84,7 @@ The payloads that require submission to Frequency should be submitted in one bat
8484
The `addProvider` *must* always be *first* in the batch to ensure the correct permissions and delegations are in place for subsequent actions in the batch.
8585

8686
Signatures to Frequency have an expiration set to a future Frequency block number.
87-
If the actions are not submitted before expriation, Frequency will reject the transactions and your application will need to request new signatures.
87+
If the actions are not submitted before expiration, Frequency will reject the transactions and your application will need to request new signatures.
8888

8989
[Payload Examples and Signature Details](../Payloads.md)
9090

@@ -108,7 +108,7 @@ Chain ID: frequency:{{chainReference}}
108108
Issued At: {{issued-at}}
109109
```
110110

111-
Inside the message, `{{domain}}` is the domain of the application requesting the sign-in. `{{domain}}` should match the domain contained in the `URI` field.
111+
Inside the message, `{{domain}}` is the domain of the application requesting the sign in. `{{domain}}` should match the domain contained in the `URI` field.
112112

113113
#### Validation Steps
114114

@@ -166,7 +166,7 @@ Frequency submission is required for any of the following payloads:
166166

167167
They can be submitted to the chain in one transaction using [`pay_with_capacity_batch_all`](https://frequency-chain.github.io/frequency/pallet_frequency_tx_payment/index.html#extrinsics).
168168

169-
## Step 6: Session Starts
169+
## Step 7: Session Starts
170170

171171
Once the payloads have been validated, the user's authenticated session may start.
172172
SIWF services do not manage user sessions.

docs/src/Actions/flow.puml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ alt Application Backend resolves payload
1616
ua->p: GET against callback url with authoricationCode
1717
p->fa: GET /<API_BASE>/api/payload trade authorizationCode for SiwfPayloadResponse
1818
return SiwfPayloadResponse {signed payloads and credentials}
19-
p->ua: Post sign-in screen
19+
p->ua: Post sign in screen
2020
p->bc: If needed, submit required transactions to Frequency
2121
return Transaction result
2222
else User Agent resolves payload
2323
ua->ua: Pre-empted by OS (Universal Link)
2424
ua->fa: GET /<API_BASE>/api/payload trade authorizationCode for SiwfPayloadResponse
2525
return SiwfPayloadResponse {signed payloads and credentials}
26-
ua->ua: Post sign-in screen
26+
ua->ua: Post sign in screen
2727
ua->p: Sign in result
2828
p->bc: If needed, submit required transactions to Frequency
2929
return Transaction result

docs/src/Actions/flow.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/src/DataStructures/ApplicationContext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Schema
44

5-
An application context credential MUST be a W3C Verifiable Credential document containing information about the application requesting user sign-in.
5+
An application context credential MUST be a W3C Verifiable Credential document containing information about the application requesting user sign in.
66

77
The `type` array for the credential should begin with the string `"ApplicationContextCredential"`.
88

docs/src/SDK/Android.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Quick Reference
44

55
- [SIWF Android SDK Source Code + Demo App](https://github.com/ProjectLibertyLabs/siwf-sdk-android)
6-
- [Maven Central Package](https://central.sonatype.com/artifact/io.projectliberty/siwf) `implementation("io.projectliberty:siwf:1.0.0")`
6+
- [Maven Central Package `io.projectliberty:siwf`](https://central.sonatype.com/artifact/io.projectliberty/siwf)
77

88
## 1. Installation
99

@@ -20,7 +20,7 @@ dependencies {
2020
}
2121
```
2222

23-
[Maven Central Pacakge Page](https://central.sonatype.com/artifact/io.projectliberty/siwf)
23+
[Maven Central Package Page](https://central.sonatype.com/artifact/io.projectliberty/siwf)
2424

2525

2626
## 2. Displaying the SIWF Button
@@ -37,9 +37,13 @@ Siwf.CreateSignInButton(
3737
)
3838
```
3939

40+
`authRequest` requires the [Signed Request Payload](../Actions/Start.html#step-1-generate-the-signed-request-payload) in either `base64url` encoded or structured form.
41+
4042
## 3. Handling Authorization Callbacks
4143

42-
Update your `AndroidManifest.xml` with your own intent filters for authentication callbacks. Example:
44+
Update your `AndroidManifest.xml` with your own intent filters for authentication callbacks.
45+
Then, use a `BroadcastReceiver()` to receive the authorization code with `AuthConstants.AUTH_INTENT_KEY`.
46+
Example:
4347

4448
```xml
4549
<activity
@@ -62,12 +66,10 @@ Update your `AndroidManifest.xml` with your own intent filters for authenticatio
6266
</activity>
6367
```
6468

65-
Then, use a `BroadcastReceiver()` to receive the authorization code with `AuthConstants.AUTH_INTENT_KEY`.
66-
6769
## 4. Process Authorization Code
6870

6971
On your backend service, process the authorization code and start your session.
7072

7173
Resources:
72-
- [SIWF Documentation on Processing a Result](https://projectlibertylabs.github.io/siwf/v2/docs/Actions/Response.html)
74+
- [Documentation on Processing a Result](../Actions/Response.html)
7375
- [Frequency Gateway SSO Tutorial](https://projectlibertylabs.github.io/gateway/GettingStarted/SSO.html)

docs/src/SDK/Overview.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
# Sign-In With Frequency (SIWF) SDK Integration Guide
1+
# Sign In With Frequency (SIWF) SDK Integration Guide
22

33
The SIWF SDK provides a seamless authentication experience for your applications.
44
These guides will walk you through integrating the SIWF SDK into your **iOS** or **Android** app.
55

6-
### Platform Specific SDK Guides
6+
### Platform-Specific SDK Guides
77

8-
- [Android](/SDK/Android.md)
9-
- [iOS](/SDK/iOS.md)
8+
- [Android](Android.md)
9+
- [iOS](iOS.md)
1010

1111
---
1212

1313
## General Overview
1414

1515
### 1. Installation
1616

17-
Add the platform specific package to your project.
17+
Add the platform-specific package to your project.
1818

1919
### 2. Displaying the SIWF Button
2020

21-
The SIWF Button creation will require the [Signed Request Payload](/Actions/Start.html#step-1-generate-the-signed-request-payload) in either `base64url` encoded or structured form.
21+
SIWF Button creation will require the [Signed Request Payload](../Actions/Start.html#step-1-generate-the-signed-request-payload) in either `base64url` encoded or structured form.
2222
You may also specify other options such as the button style (light/dark) and the network (Mainnet/Testnet) to use.
2323

2424
### 3. Handling Authorization Callbacks
2525

26-
You will need to create a redirect handler to receive the information from the Authorization.
27-
This is the redirect URL provided to the Signed Request Payload.
28-
That handler will receive the information Once the authorization is complete that can then be send and processed by your backend and initate the session.
26+
You will need to create a redirect handler to receive information from the Authorization (i.e. the redirect URL provided to the Signed Request Payload).
27+
This redirect handler will receive information once the authorization is complete, which may then be sent and processed by your system’s backend to initiate the session.
2928

30-
See the platform specific details for how to create the callback handler.
29+
See platform-specific details in the [Android](Android.md) or [iOS](iOS.md) sections for instructions for creating the callback handler
3130

3231
### 4. Process Authorization Code
3332

docs/src/SDK/iOS.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Quick Reference
44

55
- [SIWF iOS SDK Source Code + Demo App](https://github.com/ProjectLibertyLabs/siwf-sdk-ios)
6-
- [Swift Package](https://swiftpackageindex.com/ProjectLibertyLabs/siwf-sdk-ios) `https://github.com/ProjectLibertyLabs/siwf-sdk-ios.git`
6+
- [Swift Package: `https://github.com/ProjectLibertyLabs/siwf-sdk-ios.git`](https://swiftpackageindex.com/ProjectLibertyLabs/siwf-sdk-ios)
77

88
## 1. Installation
99

@@ -33,14 +33,16 @@ import Siwf
3333
Siwf.createSignInButton(mode: .primary, authRequest: authRequest)
3434
```
3535

36+
`authRequest` requires the [Signed Request Payload](../Actions/Start.html#step-1-generate-the-signed-request-payload) in either `base64url` encoded or structured form.
37+
3638
## 3. Handling Authorization Callbacks
3739

38-
Use `onOpenURL` and `Siwf.handleRedirectUrl` to handle deep links and retreive the authentication code.
40+
Use `onOpenURL` and `Siwf.handleRedirectUrl` to handle deep links and retrieve the authentication code.
3941

4042
## 4. Process Authorization Code
4143

4244
On your backend service, process the authorization code and start your session.
4345

4446
Resources:
45-
- [SIWF Documentation on Processing a Result](https://projectlibertylabs.github.io/siwf/v2/docs/Actions/Response.html)
47+
- [Documentation on Processing a Result](../Actions/Response.html)
4648
- [Frequency Gateway SSO Tutorial](https://projectlibertylabs.github.io/gateway/GettingStarted/SSO.html)

index.html

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- Index Site for SIWF that provides a basic index of pages -->
55
<meta charset="UTF-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Sign-In With Frequency (SIWF)</title>
7+
<title>Sign In With Frequency (SIWF)</title>
88
<style>
99
body {
1010
font-family: Arial, sans-serif;
@@ -30,7 +30,7 @@
3030
</style>
3131
</head>
3232
<body>
33-
<h1>Sign-In With Frequency (SIWF)</h1>
33+
<h1>Sign In With Frequency (SIWF)</h1>
3434

3535
<h2>SIWF v2</h2>
3636
<ul>
@@ -42,15 +42,11 @@ <h2>SIWF v1</h2>
4242
<ul>
4343
<li>
4444
v1 URL:
45-
<a href="https://projectlibertylabs.github.io/siwf/v1/ui/"
46-
>https://projectlibertylabs.github.io/siwf/v1/ui/</a
47-
>
45+
<a href="https://projectlibertylabs.github.io/siwf/v1/ui/">https://projectlibertylabs.github.io/siwf/v1/ui/</a>
4846
</li>
4947
<li><a href="/siwf/v1/example/">Example Site</a></li>
5048
<li>
51-
<a href="https://github.com/ProjectLibertyLabs/siwf/tree/v1"
52-
>Documentation</a
53-
>
49+
<a href="https://github.com/ProjectLibertyLabs/siwf/tree/v1">Documentation</a>
5450
</li>
5551
</ul>
5652
</body>

0 commit comments

Comments
 (0)