Documentation
¶
Overview ¶
Package token generates pseudo uddi tokens if credentials used match any storage.
Index ¶
Constants ¶
View Source
const QueryCredentials = "SELECT IF(COUNT(*),'true','false') FROM app.credentials WHERE username = ? AND password = ?"
QueryCredentials is a query that executed on DB returns true if both user and password are found in a record.
Variables ¶
View Source
var CredentialsJSONFile = "credentialsdb.json"
CredentialsJSONFile is the json file containing credentials.
Functions ¶
func CheckCredentialsDBCtx ¶ added in v1.2.0
func CheckCredentialsDBCtx(ctx context.Context, c *Credentials) (bool, error)
CheckCredentialsDBCtx looks for credentials in the DB.
func CheckLocalCredentials ¶
func CheckLocalCredentials(ctx context.Context, c *Credentials) (bool, error)
CheckLocalCredentials verifies username and passwords on local json file.
Types ¶
type Credentials ¶
Credentials is the type used to pass username and password around.
Click to show internal directories.
Click to hide internal directories.