Skip to content

Commit

Permalink
Add AccessToken to method to client
Browse files Browse the repository at this point in the history
  • Loading branch information
sneal committed Dec 15, 2022
1 parent 8252331 commit 91c0866
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ func New(config *config.Config) (*Client, error) {
return client, nil
}

// AccessToken returns the raw encoded OAuth access token without the bearer prefix
func (c *Client) AccessToken(ignoredCtx context.Context) (string, error) {
token, err := c.authenticatedClientProvider.AccessToken()
if err != nil {
return "", err
}
return token, nil
}

// SSHCode generates an SSH code that can be used by generic SSH clients to SSH into app instances
func (c *Client) SSHCode(ctx context.Context) (string, error) {
// need this to grab the SSH client id, should probably be cached in config
Expand Down

0 comments on commit 91c0866

Please sign in to comment.