shared/api/gRPC/authClientInterceptor.go
Method AuthClientInterceptor.requestAccessToken
has 5 return statements (exceeds 4 allowed). Open
Open
func (i *AuthClientInterceptor) requestAccessToken(ctx context.Context) (*meta.AuthToken, error) {
if i.accessToken != nil {
if !i.accessToken.Expires.IsZero() && i.accessToken.Expires.Nanosecond() <= time.Now().Nanosecond() {
newToken, err := i.authClient.Refresh(ctx, proto.AuthToken{}.FromNative(i.accessToken)); if err == nil {
i.accessToken = newToken.ToNative()