grim/devweb
Clone
Summary
Browse
Changes
Graph
Clean up the way the vue app is emebded and start our own ui
draft
2020-07-16, Gary Kramlich
4f1533323fbc
Clean up the way the vue app is emebded and start our own ui
package
access
import
(
"fmt"
"keep.imfreedom.org/grim/devweb/db"
)
func
Authenticate
(
username
,
password
string
)
error
{
apiKey
,
err
:=
db
.
FindAPIKey
(
username
)
if
err
!=
nil
{
return
err
}
if
password
!=
apiKey
.
SecretKey
{
return
fmt
.
Errorf
(
"invalid credentials"
)
}
return
nil
}