blob: 12570f5096beb2ea475f6fa023dbe6048a123ade [file] [log] [blame]
Ash Wilson1f110512014-10-02 15:43:47 -04001package tokens
2
Jon Perritta3302e12016-03-07 03:48:59 -06003import "fmt"
Ash Wilson1f110512014-10-02 15:43:47 -04004
5var (
6 // ErrUserIDProvided is returned if you attempt to authenticate with a UserID.
7 ErrUserIDProvided = unacceptedAttributeErr("UserID")
8
Ash Wilson1cf4d5f2014-10-07 14:16:18 -04009 // ErrAPIKeyProvided is returned if you attempt to authenticate with an APIKey.
10 ErrAPIKeyProvided = unacceptedAttributeErr("APIKey")
11
Ash Wilson1f110512014-10-02 15:43:47 -040012 // ErrDomainIDProvided is returned if you attempt to authenticate with a DomainID.
13 ErrDomainIDProvided = unacceptedAttributeErr("DomainID")
14
15 // ErrDomainNameProvided is returned if you attempt to authenticate with a DomainName.
16 ErrDomainNameProvided = unacceptedAttributeErr("DomainName")
Ash Wilson1f110512014-10-02 15:43:47 -040017)
18
19func unacceptedAttributeErr(attribute string) error {
20 return fmt.Errorf("The base Identity V2 API does not accept authentication by %s", attribute)
21}