Permalink
Browse files

Get credentials from argument

  • Loading branch information...
liesen committed Jan 4, 2013
1 parent 70f396a commit 48c837d327c738abc88db4518c0d2c8c37326ffa
Showing with 12 additions and 2 deletions.
  1. +11 −1 README.md
  2. +1 −1 main.c
View
@@ -54,4 +54,14 @@ Start the server:
./server --application-key <path to appkey> --username <username> --password <password>`
-Read the source for more command line arguments, like setting the cache location (`-C`), which port to listen on (`-P`) or how to login without using a password (`-k`).
+Read the source for more command line arguments, like setting the cache location (`-C`), which port to listen on (`-P`).
+
+### Using credentials to log in
+
+First get the credentials file from Spotify
+
+ ./server -A spotify_appkey.key -u username -p password -k .credentials
+
+Then start the server using the contents of the credentials file
+
+ cat .credentials | xargs ./server -A spotify_appkey.key -u username -c
View
2 main.c
@@ -137,7 +137,7 @@ int main(int argc, char **argv) {
{NULL, 0, NULL, 0}
};
- const char optstring[] = "u:p:k:A:C:S:T:U:H:P:";
+ const char optstring[] = "u:p:c:k:A:C:S:T:U:H:P:";
for (int c; (c = getopt_long(argc, argv, optstring, opts, NULL)) != -1; ) {
switch (c) {

0 comments on commit 48c837d

Please sign in to comment.