feat: add token file and env Login
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package auth
|
||||
|
||||
const DefaultURL = "https://agent.robinhood.com/mcp/trading"
|
||||
const DefaultName = "robinhood-agentic-mcp"
|
||||
const DefaultVersion = "0.1.0"
|
||||
|
||||
// Config is Login/Connect identity and the token file.
|
||||
type Config struct {
|
||||
URL, TokenFile, Name, Version string
|
||||
}
|
||||
|
||||
// WithDefaults fills empty URL, Name, and Version.
|
||||
func (c Config) WithDefaults() Config {
|
||||
if c.URL == "" {
|
||||
c.URL = DefaultURL
|
||||
}
|
||||
if c.Name == "" {
|
||||
c.Name = DefaultName
|
||||
}
|
||||
if c.Version == "" {
|
||||
c.Version = DefaultVersion
|
||||
}
|
||||
return c
|
||||
}
|
||||
Reference in New Issue
Block a user