Skip to content

Commit

Permalink
corrected message on token type mismatch error
Browse files Browse the repository at this point in the history
  • Loading branch information
realbucksavage committed Mar 8, 2022
1 parent 7ffc28a commit f920544
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions token_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (h *tokenStore) GetByCode(ctx context.Context, code string) (oauth2.TokenIn

valString, ok := val.(string)
if !ok {
return nil, errors.Errorf("retrieved code information was a %s, string", reflect.TypeOf(val))
return nil, errors.Errorf("retrieved code information was a %s, not string", reflect.TypeOf(val))
}

token := models.NewToken()
Expand All @@ -180,7 +180,7 @@ func (h *tokenStore) GetByAccess(ctx context.Context, access string) (oauth2.Tok

valString, ok := val.(string)
if !ok {
return nil, errors.Errorf("retrieved access information was a %s, string", reflect.TypeOf(val))
return nil, errors.Errorf("retrieved access information was a %s, not string", reflect.TypeOf(val))
}

token := models.NewToken()
Expand All @@ -206,7 +206,7 @@ func (h *tokenStore) GetByRefresh(ctx context.Context, refresh string) (oauth2.T

valString, ok := val.(string)
if !ok {
return nil, errors.Errorf("retrieved access information was a %s, string", reflect.TypeOf(val))
return nil, errors.Errorf("retrieved access information was a %s, not string", reflect.TypeOf(val))
}

token := models.NewToken()
Expand Down

0 comments on commit f920544

Please sign in to comment.