Skip to content

Commit

Permalink
Defensive coding
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Oct 21, 2021
1 parent 9cc2c76 commit 441f122
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iam/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ func (c *Client) WithLogin(username, password string) (*Client, error) {
}

func (c *Client) accessTokenEndpoint() string {
return c.baseIAMURL.String() + "oauth2/access_token"
if c.baseIAMURL != nil {
return c.baseIAMURL.String() + "oauth2/access_token"
}
return ""
}

// Token returns the current token
Expand Down

0 comments on commit 441f122

Please sign in to comment.