-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: documenting android proxy and get a token services #50
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
### createSession | ||
|
||
To retrieve sensitive data on Android, you'll need to create a `session` and use its `sessionKey` for making requests securely. | ||
To accomplish this, simply call the `createSession` function like this: | ||
|
||
```kotlin showLineNumbers | ||
val session = bt.createSession() | ||
``` | ||
|
||
This returns a [CreateSessionResponse](/docs/api/applications/sessions#create-session-response-object) | ||
which contains a `nonce` that needs to be used to [authorize the session](/docs/api/applications/sessions#authorize-session) before using it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should link to https://developers.basistheory.com/docs/guides/govern/sessions
Maybe at the end, add: "To learn more about how to authorize a session, read our guide Access Data Using Sessions"
This function wraps the [get a token API endpoint](/docs/api/tokens/#get-a-token) to | ||
be able to get a single strongly typed token. It then transforms the token's data to | ||
value references which you can use to [set the value](/docs/sdks/mobile/android/types#methods) of your elements without touching | ||
the plaintext value and getting into compliance scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: this doesn't sound quite right to me to say "getting into" here - to me "getting into" more equates to "learning about" or "being interested in"
the plaintext value and getting into compliance scope. | |
the plaintext value and pulling your application into compliance scope. |
This function receives a [ProxyRequest](/docs/sdks/mobile/android/services#proxyrequest) and wraps the [proxy API endpoint](/docs/api/proxies/invoke-proxy) to | ||
be able to proxy a request to a third party API. It then transforms the response to | ||
value references which you can then use to [set the value](/docs/sdks/mobile/android/types#methods) of your elements without touching | ||
the plaintext value and getting into compliance scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the plaintext value and getting into compliance scope. | |
the plaintext value and pulling your application into compliance scope. |
| `queryParams` | false | _Map<String, String>?_ | `emptyMap()` | Map of query parameters to include in the request. | | ||
| `headers` | false | _Map<String, String>?_ | `emptyMap()` | Map of headers to include in the request. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having this thought late here in the docs, but technically, query params and headers can be repeated with the same name, so it might be more correct to make these some sort of array of pairs instead of maps. We may never run into that use case from here though, but if we do that would be a breaking change...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, the java sdk receives a map for headers but for query params it does receive a list of pairs instead
### getToken | ||
|
||
This function wraps the [get a token API endpoint](/docs/api/tokens/#get-a-token) to | ||
be able to get a single strongly typed token. It then transforms the token's data to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be able to get a single strongly typed token. It then transforms the token's data to | |
retrieve a single strongly typed token. It then transforms the token's data to |
### proxy | ||
|
||
This function receives a [ProxyRequest](/docs/sdks/mobile/android/services#proxyrequest) and wraps the [proxy API endpoint](/docs/api/proxies/invoke-proxy) to | ||
be able to proxy a request to a third party API. It then transforms the response to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be able to proxy a request to a third party API. It then transforms the response to | |
proxy a request to a third party API. It then transforms the response to |
docs/sdks/mobile/android/types.mdx
Outdated
|
||
<Alert> | ||
When using <code>setValueRef</code> to keep a <code>TextElement</code> in sync with another element, or to set the text of an element, it is strongly recommended that | ||
you make the element acted upon readonly by also setting <code>isEditable=false</code>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you make the element acted upon readonly by also setting <code>isEditable=false</code>. | |
you make the element that is being acted upon a "readonly" element. This is possible by setting <code>isEditable=false</code>. |
docs/sdks/mobile/android/types.mdx
Outdated
When using <code>setValueRef</code> to keep a <code>TextElement</code> in sync with another element, it is strongly recommended that | ||
you make the dependent element readonly by also setting <code>isEditable=false</code>. | ||
<code>ElementValueReference</code> is a class that stores a reference to a value which can only be accessed by BasisTheoryElements, so that | ||
you can reference data without touching the plaintext value and getting into compliance scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can reference data without touching the plaintext value and getting into compliance scope. | |
you can reference data without touching the plaintext value and pulling your application into compliance scope. |
# [1.21.0](v1.20.2...v1.21.0) (2023-01-26) ### Features * documenting android proxy and retrieve token services ([#50](#50)) ([9222cf4](9222cf4))
🎉 This PR is included in version 1.21.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Testing required outside of automated testing?
Screenshots (if appropriate):
Rollback / Rollforward Procedure
Reviewer Checklist