(authURL string)
| 77 | } |
| 78 | |
| 79 | func matchVersionFromAuthURL(authURL string) (version string) { |
| 80 | re := regexp.MustCompile(`(?P<version>v[\d\.]+)/?$`) |
| 81 | match := re.FindStringSubmatch(authURL) |
| 82 | for i, name := range re.SubexpNames() { |
| 83 | if name == "version" && i < len(match) { |
| 84 | version = match[i] |
| 85 | break |
| 86 | } |
| 87 | } |
| 88 | return |
| 89 | } |
| 90 | |
| 91 | //NewKeystoneIdentity is an constructor for KeystoneIdentity middleware |
| 92 | func NewKeystoneIdentity(authURL, userName, password, domainName, tenantName, version string) (*KeystoneIdentity, error) { |
no outgoing calls
no test coverage detected