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

revert: remove resident key unrequired method #30

Merged
merged 1 commit into from
Mar 4, 2022
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
revert: remove resident key unrequired method
This restores the method protocol.ResidentKeyUnrequired() as an alias of the new option. The restored method is CLEARLY marked as deprecated and will be removed in the future.
  • Loading branch information
james-d-elliott committed Mar 4, 2022
commit f146607b3bff3e3924ebc016b0025ad0948cc0c6
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ There are several differences between the upstream library and this one. We will

* There are minimal breaking changes between this library and the upstream one. Identified breaking changes exist in the
following commits:
* Change of protocol.ResidentKeyUnrequired() to protocol.ResidentKeyNotRequired() [5ad54f8](https://github.com/go-webauthn/webauthn/commit/5ad54f89952eb238a7d6e10ed2d443738351d67f).
* ~~Change of protocol.ResidentKeyUnrequired() to protocol.ResidentKeyNotRequired() [5ad54f8](https://github.com/go-webauthn/webauthn/commit/5ad54f89952eb238a7d6e10ed2d443738351d67f).~~
This method has been restored as a deprecated function making the migration path clearer.
* This library is versioned with branches per minor version for back-porting fixes.
* The following PR's in the upstream repository are merged in one form or another:
* PR132 was merged in [401a3f6](https://github.com/go-webauthn/webauthn/commit/401a3f63b5fb3c91faa52c56a9295b78d62e039f).
Expand Down
3 changes: 2 additions & 1 deletion protocol/attestation_packed.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"strings"
"time"

"github.com/google/uuid"

"github.com/go-webauthn/webauthn/metadata"
"github.com/go-webauthn/webauthn/protocol/webauthncose"
"github.com/google/uuid"
)

var packedAttestationKey = "packed"
Expand Down
3 changes: 2 additions & 1 deletion protocol/attestation_safetynet.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"fmt"
"time"

"github.com/go-webauthn/webauthn/metadata"
"github.com/golang-jwt/jwt/v4"
"github.com/mitchellh/mapstructure"

"github.com/go-webauthn/webauthn/metadata"
)

var safetyNetAttestationKey = "android-safetynet"
Expand Down
5 changes: 5 additions & 0 deletions protocol/authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ func ResidentKeyNotRequired() *bool {
return &required
}

// Deprecated: ResidentKeyUnrequired is an alias for ResidentKeyNotRequired and will be completely removed in the future.
func ResidentKeyUnrequired() *bool {
return ResidentKeyNotRequired()
}

// Verify on AuthenticatorData handles Steps 9 through 12 for Registration
// and Steps 11 through 14 for Assertion.
func (a *AuthenticatorData) Verify(rpIdHash []byte, appIDHash []byte, userVerificationRequired bool) error {
Expand Down