Skip to content

Take TokenCredential instead of bearer token #426

@thovoll

Description

@thovoll

All our SDKs take an endpoint and a credential, which is almost always a TokenCredential define in azure_core, with implementations like DefaultAzureCredential in azure_identity. This is laid out in our guidelines.

I recommend taking a look at what we've done for our other Azure SDKs - any packages starting with "azure*" (as opposed to "microsoft.azure*" or something). I'm not sure about data lake specifically, but for storage in general we already have good examples you should match (type names, method names besides casing, param names, etc. - something we all do across official languages):

For example,

Specific to authentication, the TokenCredential is responsible for authenticating the user and getting a token. How that is attached to your request is up to you (and we have some helps in azure_core that may help, though not as many built out as with our other languages). In general, you should not roll your own authentication. Some libraries will, in addition, take a connection string. Follow whatever official languages are doing for guidance in those cases, though.

Originally posted by @heaths in #358 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions