Files
threshold/internal/auth/password/private_ids_test.go
T
Michael GaffneyandTodd Knight 6c679a9939 Add password authentication using Argon2 (#227)
* Add argon2 credentials

* Verify oplog in tests

* Refactor: rename field

* Update internal/auth/password/repository_account.go

Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>

* Add inline comments to SQL query to doc mapping to structure

* Refactor: move authentication query to query.go file

* Replace immutable_create_time_func with immutable_columns

Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
2020-07-31 11:18:41 -04:00

23 lines
531 B
Go

package password
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_PrivateIds(t *testing.T) {
t.Run("argon2Config", func(t *testing.T) {
id, err := newArgon2ConfigurationId()
require.NoError(t, err)
assert.True(t, strings.HasPrefix(id, argon2ConfigurationPrefix+"_"))
})
t.Run("argon2Cred", func(t *testing.T) {
id, err := newArgon2CredentialId()
require.NoError(t, err)
assert.True(t, strings.HasPrefix(id, argon2CredentialPrefix+"_"))
})
}