Skip to content

Commit

Permalink
Support OAuth authentication in FileConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
0xf4b1 committed Oct 3, 2024
1 parent 0381ea3 commit e35fb02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ public Session.Builder initSessionBuilder() throws IOException, GeneralSecurityE
case STORED:
builder.stored();
break;
case OAUTH:
builder.oauth();
break;
case ZEROCONF:
default:
throw new IllegalArgumentException(authStrategy().name());
Expand Down Expand Up @@ -458,7 +461,7 @@ public PlayerConfiguration toPlayer() {
}

public enum AuthStrategy {
FACEBOOK, BLOB, USER_PASS, ZEROCONF, STORED
FACEBOOK, BLOB, USER_PASS, ZEROCONF, STORED, OAUTH
}

private final static class PropertiesFormat implements ConfigFormat<Config> {
Expand Down
2 changes: 1 addition & 1 deletion player/src/main/resources/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ preferredLocale = "en" ### Preferred locale ###
logLevel = "TRACE" ### Log level (OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL) ###

[auth] ### Authentication ###
strategy = "ZEROCONF" # Strategy (USER_PASS, ZEROCONF, BLOB, FACEBOOK, STORED)
strategy = "ZEROCONF" # Strategy (USER_PASS, ZEROCONF, BLOB, FACEBOOK, STORED, OAUTH)
username = "" # Spotify username (BLOB, USER_PASS only)
password = "" # Spotify password (USER_PASS only)
blob = "" # Spotify authentication blob Base64-encoded (BLOB only)
Expand Down

0 comments on commit e35fb02

Please sign in to comment.