Skip to content

Commit

Permalink
refactor(azure_identity_access_token_provider.go): support the latest…
Browse files Browse the repository at this point in the history
… kiota-abstractions-go

Support the latest kiota-abstractions-go
  • Loading branch information
XdpCs committed Jan 19, 2024
1 parent 61548a8 commit a2b6353
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

## [1.0.2] - 2024-01-19

### Changed

- Support the latest github.com/microsoft/kiota-abstractions-go.

## [1.0.1] - 2023-10-13

### Changed
Expand Down
13 changes: 7 additions & 6 deletions azure_identity_access_token_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ func NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityO
if scopesLen > 0 {
copy(finalScopes, scopes)
}
validator := absauth.NewAllowedHostsValidator(validHosts)
result := &AzureIdentityAccessTokenProvider{
validator, err := absauth.NewAllowedHostsValidatorErrorCheck(validHosts)
if err != nil {
return nil, err
}
return &AzureIdentityAccessTokenProvider{
credential: credential,
scopes: finalScopes,
allowedHostsValidator: &validator,
allowedHostsValidator: validator,
observabilityOptions: observabilityOptions,
}

return result, nil
}, nil
}

const claimsKey = "claims"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1
github.com/microsoft/kiota-abstractions-go v1.5.5
github.com/microsoft/kiota-abstractions-go v1.5.6
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/otel v1.22.0
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/microsoft/kiota-abstractions-go v1.5.5 h1:ofdQd5b42KzSDJhc11qFeddVd2GIh0FyiGYhUUSLO00=
github.com/microsoft/kiota-abstractions-go v1.5.5/go.mod h1:PcgbR/QXB3EePCbP1OM4Hhk1R9a033D4K/gC3ltHv2w=
github.com/microsoft/kiota-abstractions-go v1.5.6 h1:3hd1sACWB2B9grv8KG1T8g/gGQ4A8kTLv91OUxHSxkE=
github.com/microsoft/kiota-abstractions-go v1.5.6/go.mod h1:2WX7Oh8V9SAdZ80OGeE53rcbdys54Pd38rAeDUghrpM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/std-uritemplate/std-uritemplate/go v0.0.50 h1:LAE6WYRmLlDXPtEzr152BnD/MHxGCKmcp5D2Pw0NvmU=
Expand Down

0 comments on commit a2b6353

Please sign in to comment.