ReadKiteKey parsed the user's kite key and returns a new Config.
()
| 242 | |
| 243 | // ReadKiteKey parsed the user's kite key and returns a new Config. |
| 244 | func (c *Config) ReadKiteKey() error { |
| 245 | key, err := kitekey.Parse() |
| 246 | if err != nil { |
| 247 | return err |
| 248 | } |
| 249 | |
| 250 | return c.ReadToken(key) |
| 251 | } |
| 252 | |
| 253 | // ReadToken reads Kite Claims from JWT token and uses them to initialize Config. |
| 254 | func (c *Config) ReadToken(key *jwt.Token) error { |