You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/auth/password/public_ids.go

30 lines
581 B

package password
import (
"fmt"
"github.com/hashicorp/watchtower/internal/db"
)
// PublicId prefixes for the resources in the password package.
const (
AuthMethodPrefix = "paum"
AccountPrefix = "pacc"
)
func newAuthMethodId() (string, error) {
id, err := db.NewPublicId(AuthMethodPrefix)
if err != nil {
return "", fmt.Errorf("new password auth method id: %w", err)
}
return id, err
}
func newAccountId() (string, error) {
id, err := db.NewPublicId(AccountPrefix)
if err != nil {
return "", fmt.Errorf("new password account id: %w", err)
}
return id, err
}