A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/segmentio/aws-okta/commit/a7ba4e72b58b39c7f2c5023cb35551bd71b4c947 below:

Bugfix to migrate Factor U2F to WebAuthn. (#277) · segmentio/aws-okta@a7ba4e7 · GitHub

@@ -22,19 +22,19 @@ var (

22 22

type FidoClient struct {

23 23

ChallengeNonce string

24 24

AppId string

25 -

Version string

26 25

Device u2fhost.Device

27 26

KeyHandle string

28 27

StateToken string

29 28

}

30 29 31 30

type SignedAssertion struct {

32 -

StateToken string `json:"stateToken"`

33 -

ClientData string `json:"clientData"`

34 -

SignatureData string `json:"signatureData"`

31 +

StateToken string `json:"stateToken"`

32 +

ClientData string `json:"clientData"`

33 +

SignatureData string `json:"signatureData"`

34 +

AuthenticatorData string `json:"authenticatorData"`

35 35

}

36 36 37 -

func NewFidoClient(challengeNonce, appId, version, keyHandle, stateToken string) (FidoClient, error) {

37 +

func NewFidoClient(challengeNonce, appId, keyHandle, stateToken string) (FidoClient, error) {

38 38

var device u2fhost.Device

39 39

var err error

40 40

@@ -55,7 +55,6 @@ func NewFidoClient(challengeNonce, appId, version, keyHandle, stateToken string)

55 55

Device: device,

56 56

ChallengeNonce: challengeNonce,

57 57

AppId: appId,

58 -

Version: version,

59 58

KeyHandle: keyHandle,

60 59

StateToken: stateToken,

61 60

}, nil

@@ -72,9 +71,10 @@ func (d *FidoClient) ChallengeU2f() (*SignedAssertion, error) {

72 71

request := &u2fhost.AuthenticateRequest{

73 72

Challenge: d.ChallengeNonce,

74 73

// the appid is the only facet.

75 -

Facet: d.AppId,

74 +

Facet: "https://" + d.AppId,

76 75

AppId: d.AppId,

77 76

KeyHandle: d.KeyHandle,

77 +

WebAuthn: true,

78 78

}

79 79

// do the change

80 80

prompted := false

@@ -96,9 +96,10 @@ func (d *FidoClient) ChallengeU2f() (*SignedAssertion, error) {

96 96

response, err := d.Device.Authenticate(request)

97 97

if err == nil {

98 98

responsePayload = &SignedAssertion{

99 -

StateToken: d.StateToken,

100 -

ClientData: response.ClientData,

101 -

SignatureData: response.SignatureData,

99 +

StateToken: d.StateToken,

100 +

ClientData: response.ClientData,

101 +

SignatureData: response.SignatureData,

102 +

AuthenticatorData: response.AuthenticatorData,

102 103

}

103 104

fmt.Printf(" ==> Touch accepted. Proceeding with authentication\n")

104 105

return responsePayload, nil


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4