Skip to content

Commit

Permalink
revert: remove resident key unrequired method (#30)
Browse files Browse the repository at this point in the history
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
1 parent a7a8d31 commit bd4f996
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
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
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
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
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

0 comments on commit bd4f996

Please sign in to comment.