You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/pages/[platform]/connected-components/liveness/quick-start-pull.swift.mdx
+60-1Lines changed: 60 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,17 +93,76 @@ When initially configuring Amplify (assuming you are using no pieces of Amplify
93
93
94
94
By default, FaceLivenessDetector uses Amplify Auth to authorize users to perform the Face Liveness check. You can use your own credentials provider to retrieve credentials from [Amazon Cognito](https://aws.amazon.com/cognito/) or assume a role with [Amazon STS](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html), for example:
95
95
96
+
For long lived credentials, you may retrieve `AWSCredentials` by implementing your custom `AWSCredentialsProvider`.
97
+
98
+
```swift
99
+
/**
100
+
Represents AWS credentials.
101
+
102
+
Typically refers to long-term credentials that do not expire unless manually rotated or deactivated.
103
+
These credentials are generally associated with an IAM (Identity and Access Management) user and are used to authenticate API requests to AWS services.
104
+
105
+
- Properties:
106
+
- accessKeyId: A unique identifier.
107
+
- secretAccessKey: A secret key used to sign requests cryptographically.
108
+
*/
109
+
110
+
public protocol AWSCredentials {
111
+
112
+
/// A unique identifier.
113
+
var accessKeyId: String { get }
114
+
115
+
/// A secret key used to sign requests cryptographically.
If you're providing temporary credentials, make sure that your `AWSCredentials` object conforms to `AWSTemporaryCredentials`, which must include `sessionToken`.
131
+
132
+
```swift
133
+
/**
134
+
Represents temporary AWS credentials.
135
+
136
+
Refers to short-term credentials generated by AWS STS (Security Token Service).
137
+
These credentials are used for temporary access, often for applications, temporary roles, federated users, or scenarios requiring limited-time access.
138
+
139
+
- Inherits: AWSCredentials
140
+
141
+
- Properties:
142
+
- sessionToken: A token that is required when using temporary security credentials to sign requests.
143
+
- expiration: The expiration date and time of the temporary credentials.
144
+
*/
145
+
public protocol AWSTemporaryCredentials: AWSCredentials {
146
+
147
+
/// A token that is required when using temporary security credentials to sign requests.
148
+
var sessionToken: String { get }
149
+
150
+
/// The expiration date and time of the temporary credentials.
0 commit comments