ActiveTokenType reports what kind of credential the active token is, so a caller that only needs to know that can avoid handling the token. It is currently unused.
(hostname string)
| 324 | // caller that only needs to know that can avoid handling the token. It is |
| 325 | // currently unused. |
| 326 | func (c *AuthConfig) ActiveTokenType(hostname string) gh.TokenType { |
| 327 | token := c.ActiveToken(hostname).Token |
| 328 | for _, tokenType := range gh.TokenTypes { |
| 329 | if strings.HasPrefix(token, string(tokenType)) { |
| 330 | return tokenType |
| 331 | } |
| 332 | } |
| 333 | return gh.TokenTypeUnknown |
| 334 | } |
| 335 | |
| 336 | // ActiveToken retrieves the active credential for the given hostname, searching environment variables, plain text |
| 337 | // config, and lastly encrypted storage. It returns the last stored token as-is, including the current access token of |
nothing calls this directly
no test coverage detected