openshift / osin

Golang OAuth2 server library
BSD 3-Clause "New" or "Revised" License
1.92k stars 399 forks source link

Handle ErrNotFound separately in GetClient result #170

Closed astridej closed 6 years ago

astridej commented 6 years ago

The GetClient method should return a not found error if no matching client was found. However, callers of this method expect nonexistent clients to be returned as nil without an error. This mismatch means that an authorize request with an incorrect client ID will get a response stating there was an unexpected server error. Separate error handling of ErrNotFound is needed.