boraarslan / mapper-influence

0 stars 0 forks source link

Add osu! API authentication token revoke and client token endpoints #28

Closed 112batuhan closed 1 year ago

112batuhan commented 1 year ago

The added client_token method can be used to bypass the authorization code grant to get an authentication token that works on public endpoints.

I thought that this might be useful in the future so I added it in the API library. The only change, which might affect you is that I had to wrap refresh_token field, which in AuthResponseBody struct, in an Option enum to accommodate this new method because authorization code grant endpoint doesn't return a refresh token.

Another addition is that I also implemented the revoke method to revoke the authorization tokens. This might be needed in case we want to implement log out functionality.

112batuhan commented 1 year ago

Removed beatmap.rs changes from this pr.

boraarslan commented 1 year ago

I am not approving this PR since we do not need this functionality right now, and I can't think of any scenario in which we will need this in the future. I will not delete the branch so in case we need this feel free to open a PR again.