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

[Core] Rename AnonymousCredential #15104

Merged
merged 6 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/azcore/policy_anonymous_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ func anonCredPolicyFunc(req *Request) (*Response, error) {
return req.Next()
}

// AnonymousCredential is for use with HTTP(S) requests that read public resource
// NewAnonymousCredential is for use with HTTP(S) requests that read public resource
// or for use with Shared Access Signatures (SAS).
func AnonymousCredential() Credential {
func NewAnonymousCredential() Credential {
return credentialFunc(anonCredAuthPolicyFunc)
}
2 changes: 1 addition & 1 deletion sdk/azcore/policy_anonymous_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestAnonymousCredential(t *testing.T) {
srv, close := mock.NewServer()
defer close()
srv.SetResponse(mock.WithStatusCode(http.StatusOK))
pl := NewPipeline(srv, AnonymousCredential().NewAuthenticationPolicy(AuthenticationOptions{}))
pl := NewPipeline(srv, NewAnonymousCredential().NewAuthenticationPolicy(AuthenticationOptions{}))
req, err := NewRequest(context.Background(), http.MethodGet, srv.URL())
if err != nil {
t.Fatalf("unexpected error: %v", err)
Expand Down