-
Notifications
You must be signed in to change notification settings - Fork 61
[cadl-python] support @useAuth
#1395
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
Conversation
| return { | ||
| type: credential_type, | ||
| optional: false, | ||
| description: "Credential needed for the client to connect to Azure.", | ||
| clientName: "credential", | ||
| location: "other", | ||
| restApiName: "credential", | ||
| implementation: "Client", | ||
| skipUrlEncoding: true, | ||
| inOverload: false | ||
| }; |
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.
Currently we only support one kind of auth even if more kinds are defined.
| credential_type = { | ||
| type: "OAuth2", | ||
| policy: { | ||
| type: "BearerTokenCredentialPolicy", |
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.
We can't get info to distinguish BearerTokenCredentialPolicy and ARMChallengeAuthenticationPolicy. Maybe we can get it in sidecar in the future?
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.
good point, we basically need sidecar / additional cadl improvements to know if something is --azure-arm or not. I think we can do BearerTokenCredentialPolicy for now, but ARM is blocked from using our CADL SDKs until we add this support.
cc @Azure/linux-sme
| } | ||
| } | ||
| } | ||
| return undefined |
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.
it seems that the Prettier can't work although it doesn't influence running. I think we can configure some settings in .vscode to automatically format the code like cadl-azure.
#1394
test cadl: https://github.com/Azure/azure-rest-api-specs-pr/pull/8292/files