Skip to content

Commit 66cb2ad

Browse files
committed
Sync open source content 🐝
1 parent e5c8187 commit 66cb2ad

File tree

5 files changed

+19
-1
lines changed

5 files changed

+19
-1
lines changed

docs/customize/authentication/oauth.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,9 @@ components:
453453
security:
454454
- oauth2: [products:read]
455455
```
456+
456457
To enable OAuth 2.0 ROPC flow in the SDK, add the following to the `gen.yaml` file:
458+
457459
```yaml
458460
configVersion: 2.0.0
459461
generation:
@@ -520,11 +522,13 @@ SDK sdk = SDK.builder()
520522
.build();
521523
ListProductsResponse res = sdk.listProducts().call();
522524
```
525+
523526
</CodeWithTabs>
524527

525528
It is also possbile to bypass token retrievals by passing an explicit token to the SDK object:
526529

527530
<CodeWithTabs>
531+
528532
```typescript !!tabs TypeScript
529533
const sdk = new SDK({
530534
oauth2: "THE_TOKEN"
@@ -533,12 +537,23 @@ const sdk = new SDK({
533537
const result = await sdk.listProducts();
534538
```
535539

540+
```go !!tabs Go
541+
s := sdk.New(
542+
sdk.WithSecurity(components.Oauth2Input{
543+
Oauth2Token: "THE_TOKEN",
544+
}))
545+
)
546+
ctx := context.Background()
547+
s.Drinks.ListProducts(ctx)
548+
```
549+
536550
```java !!tabs Java
537551
SDK sdk = SDK.builder()
538552
.oauth2(Oauth2Input.of("THE_TOKEN"))
539553
.build();
540554
ListProductsResponse res = sdk.listProducts().call();
541555
```
556+
542557
</CodeWithTabs>
543558

544559
## Authorization code flow

docs/languages/golang/feature-support.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Table } from "@/mdx/components";
1616
{ name: "OAuth implicit flow", support: "", docs: "Docs", notes: "" },
1717
{ name: "OAuth refresh token flow", support: "🏗️ Partial", docs: "Docs", notes: "" },
1818
{ name: "OAuth client credentials flow", support: "🏗️ Partial", docs: "Docs", notes: "" },
19+
{ name: "OAuth resource owner password flow", support: "", docs: "Docs", notes: "" },
1920
{ name: "mTLS", support: "🏗️ Partial", docs: "Docs", notes: "" }
2021
]}
2122
columns={[

docs/languages/java/feature-support.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Table } from "@/mdx/components";
1616
{ name: "OAuth implicit flow", support: "", docs: "Docs", notes: "" },
1717
{ name: "OAuth refresh token flow", support: "✅ using security callbacks", docs: "Docs", notes: "" },
1818
{ name: "OAuth client credentials flow", support: "🏗️ Partial", docs: "Docs", notes: "" },
19+
{ name: "OAuth resource owner password flow", support: "", docs: "Docs", notes: "" },
1920
{ name: "mTLS", support: "🏗️ Partial", docs: "Docs", notes: "" }
2021
]}
2122
columns={[

docs/languages/typescript/feature-support.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Table } from "@/mdx/components";
1616
{ name: "OAuth implicit flow", support: "", docs: "Docs", notes: "" },
1717
{ name: "OAuth refresh token flow", support: "✅ using security callbacks", docs: "Docs", notes: "" },
1818
{ name: "OAuth client credentials flow", support: "✅ using hooks", docs: "Docs", notes: "" },
19+
{ name: "OAuth resource owner password flow", support: "", docs: "Docs", notes: "" },
1920
{ name: "mTLS", support: "🏗️ Partial", docs: "Docs", notes: "" }
2021
]}
2122
columns={[

docs/supported/terraform.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import { Table } from "@/mdx/components";
9797
{
9898
semantic: "Global authentication",
9999
support: "✅ Full support",
100-
comments: "All authentication mechanisms that rely on static authorization are supported, with their values automatically configurable in the provider settings. For OAuth, you need to write a custom hook that implements your authentication flow logic."
100+
comments: "All authentication mechanisms that rely on static authorization are supported, with their values automatically configurable in the provider settings."
101101
},
102102
{
103103
semantic: "Query parameter serialization",

0 commit comments

Comments
 (0)