pushing code
-
Private servers only accept authentication through Steam tickets generated by the native client, so I'm afraid it's not possible. We don't have any plans to add more authentication methods.
-
I Just tried disabling authentication completely, it still returns a 401 error.
Do private servers have a different kind of authentication ?
edit: digging through the source code , i have the feeling this the private server is using some kind of steam based sso-authentication ... is there any chance this is going to work without steam client ?
I don't know for the other players, but to me, one of main values of the private server is to offer some kind of fast (and, let's dream, debuggable) PTR, and being able to deploy code as on live would be nice
-
@Finndibaen See the readme section on Authentication.
I will say that looking at the code it is possible to implement your own version of this through mods. If you look in the examples there is a /api/test/ endpoint. You might be able to reimplement the official screeps api/user/code by forwarding the auth token? I'm looking into what it would take to implement this mod.
-
You can simply deploy code by changing files in your local scripts folder. Click “Open local folder” button in your in-game script editor. You don’t have to set up grunt task if you have the Steam version installed.
As to custom authentication mechanism using mods, it’s fully doable, see
config.backend.expressPreConfig
andconfig.backend.router
options. You can even implement your own API keys system using these.
-
Woot! I got a v1 of a mod to do this. Note that there is no authentication for this meaning that anyone can push any code for any player. I'm working on getting auth to work, but for those like me just using private server as a personal PTR, it works.
https://github.com/zininzinin/code-push-sceeps
Call Example:
{"email": "test@test.com", "branch":"default","modules":{"main":"require(\"hello\");","hello":"console.log(\"Hello World!\");"}}
-
I've got a mod that does this and adds auth
http://puu.sh/rWZIJ/73da93abf1.png
https://gist.github.com/ags131/4e2c4298e329846cf3021af690b53fab
Its published to NPM, but until I release my modloader mod, that version isn't as easily used.
It allows ANY existng screep API client to connect as long as your client supports setting the server URL, an email, and password
-
Aww poo. You beat me to it. I just finished adding auth to my code push method, but it could use some touch up. Now i just need to pull request for grunt-screeps to be able to hit this.
{"email": "test@test.com", "password": "pass", "branch":"default","modules":{"main":"require(\"hello\");","hello":"console.log(\"Hello World!\");"}}
-
Heres a couple mods I've created so far
https://github.com/ags131/screepsmod-modloader
https://github.com/ags131/screepsmod-apitoken
-
Nice mods! Is there a place to post private server mods to yet? Also, I've edited the grunt-screeps to allow integration with my private server mod:
-
Not that I know of, we've been sharing links in the slack #servers channel. Also, the API token mod I made only requires clients to support changing URL, the normal /api/user/code endpoint works