Skip to content
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

Fix password flow #3196

Merged
merged 14 commits into from
Apr 23, 2024
8 changes: 8 additions & 0 deletions .chronus/changes/fix-password-flow-2024-3-19-16-22-3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@typespec/http"
---

Fix password flow defining `authorizationUrl` instead of `tokenUrl`
12 changes: 6 additions & 6 deletions docs/libraries/http/reference/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,12 @@ model TypeSpec.Http.PasswordFlow

#### Properties

| Name | Type | Description |
| ---------------- | --------------------------------------- | --------------------------------- |
| type | `TypeSpec.Http.OAuth2FlowType.password` | password flow |
| authorizationUrl | `string` | the authorization URL |
| refreshUrl? | `string` | the refresh URL |
| scopes? | `string[]` | list of scopes for the credential |
| Name | Type | Description |
| ----------- | --------------------------------------- | --------------------------------- |
| type | `TypeSpec.Http.OAuth2FlowType.password` | password flow |
| tokenUrl | `string` | the token URL |
| refreshUrl? | `string` | the refresh URL |
| scopes? | `string[]` | list of scopes for the credential |

### `PlainData` {#TypeSpec.Http.PlainData}

Expand Down
4 changes: 2 additions & 2 deletions packages/http/lib/auth.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ model PasswordFlow {
@doc("password flow")
type: OAuth2FlowType.password;

@doc("the authorization URL")
authorizationUrl: string;
@doc("the token URL")
tokenUrl: string;

@doc("the refresh URL")
refreshUrl?: string;
Expand Down
Loading