feat: add token file and env Login

This commit is contained in:
2026-09-01 11:53:16 -05:00
parent 076c8c81b8
commit 3983d0b335
5 changed files with 170 additions and 0 deletions
+24
View File
@@ -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
}