ParseFile reads the given kite key file and parses it as a JWT token.
(file string)
| 92 | |
| 93 | // ParseFile reads the given kite key file and parses it as a JWT token. |
| 94 | func ParseFile(file string) (*jwt.Token, error) { |
| 95 | kiteKey, err := ioutil.ReadFile(file) |
| 96 | if err != nil { |
| 97 | return nil, err |
| 98 | } |
| 99 | |
| 100 | return jwt.ParseWithClaims(string(bytes.TrimSpace(kiteKey)), &KiteClaims{}, GetKontrolKey) |
| 101 | } |
| 102 | |
| 103 | // Extractor is used to extract kontrol key from JWT token. |
| 104 | type Extractor struct { |
nothing calls this directly
no outgoing calls
no test coverage detected