Skip to content

Commit

Permalink
fix: use correct code credential config in manager_http_test
Browse files Browse the repository at this point in the history
  • Loading branch information
wewelll committed Feb 25, 2025
1 parent 82572bd commit 0186e87
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions session/manager_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ func TestManagerHTTP(t *testing.T) {
actualIdentity, err := reg.IdentityPool().GetIdentity(ctx, i.ID, identity.ExpandNothing)
require.NoError(t, err)
assert.EqualValues(t, identity.AuthenticatorAssuranceLevel1, actualIdentity.InternalAvailableAAL.String)

})

t.Run("suite=SessionAddAuthenticationMethod", func(t *testing.T) {
Expand Down Expand Up @@ -513,7 +512,7 @@ func TestDoesSessionSatisfy(t *testing.T) {
code := identity.Credentials{
Type: identity.CredentialsTypeCodeAuth,
Identifiers: []string{testhelpers.RandomEmail()},
Config: []byte(`{"address_type":"email","used_at":{"Time":"0001-01-01T00:00:00Z","Valid":false}}`),
Config: []byte(`{"addresses":[{"address":"[email protected]","channel":"email"}],"used_at":{"Time":"0001-01-01T00:00:00Z","Valid":false}}`),
}
//codeEmpty := identity.Credentials{
// Type: identity.CredentialsTypeCodeAuth,
Expand Down Expand Up @@ -690,7 +689,7 @@ func TestDoesSessionSatisfy(t *testing.T) {
{
desc: "with highest_available a recovery link user requires aal2 if they have 2fa code configured",
matcher: config.HighestAvailableAAL,
creds: []identity.Credentials{},
creds: []identity.Credentials{code},
withAMR: session.AuthenticationMethods{amrs[identity.CredentialsTypeRecoveryLink]},
withContext: func(t *testing.T, ctx context.Context) context.Context {
return confighelpers.WithConfigValues(ctx, map[string]any{
Expand Down

0 comments on commit 0186e87

Please sign in to comment.