Refactor: remove Auth() from Forge interface (#6505)

This commit is contained in:
6543
2026-04-26 15:36:12 +02:00
committed by GitHub
parent 26c793f650
commit d34649de22
11 changed files with 0 additions and 176 deletions
-10
View File
@@ -149,16 +149,6 @@ func (c *client) Login(ctx context.Context, req *forge_types.OAuthRequest) (*mod
}, redirectURL, nil
}
// Auth returns the GitHub user login for the given access token.
func (c *client) Auth(ctx context.Context, token, _ string) (string, error) {
client := c.newClientToken(ctx, token)
user, _, err := client.Users.Get(ctx, "")
if err != nil {
return "", err
}
return *user.Login, nil
}
// Refresh refreshes the Gitlab oauth2 access token. If the token is
// refreshed the user is updated and a true value is returned.
func (c *client) Refresh(ctx context.Context, user *model.User) (bool, error) {