1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 20:05:29 +08:00

Expose oauth access token via api interface

This commit is contained in:
Dean Herbert 2020-10-22 15:03:43 +09:00
parent 175fd512b0
commit 4788b4a643
3 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,8 @@ namespace osu.Game.Online.API
public Bindable<UserActivity> Activity { get; } = new Bindable<UserActivity>();
public string AccessToken => "token";
public bool IsLoggedIn => State.Value == APIState.Online;
public string ProvidedUsername => LocalUser.Value.Username;

View File

@ -19,6 +19,11 @@ namespace osu.Game.Online.API
/// </summary>
Bindable<UserActivity> Activity { get; }
/// <summary>
/// Retrieve the OAuth access token.
/// </summary>
public string AccessToken { get; }
/// <summary>
/// Returns whether the local user is logged in.
/// </summary>

View File

@ -23,7 +23,7 @@ namespace osu.Game.Online.Spectator
private readonly IBindable<APIState> apiState = new Bindable<APIState>();
[Resolved]
private APIAccess api { get; set; }
private IAPIProvider api { get; set; }
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; }