phoss-smp
phoss-smp copied to clipboard
Call Rest API with Access Token
I want to call Rest API with Access Token that I made on Phoss-SMP. Can I call Rest API with Access Token ?
@sakasaka19 Very good input - thanks. Let me check what the implications are. In general I don't see an immediate problem.
You mean e.g. passing that via a custom HTTP header like
SMP-Token: <accessToken>
right?
Edit: this proposal is no longer valid. See below for a Bearer token approach
I'm sorry to reply late. Yes. I want to passing that via a custom HTTP header.
I found the menu of user token management(Access Token) in GUI of SMP , So I thought that I can use access token in the place of HTTP Basic Auth(ID/Password Login). but I don't understand how to use Access Token in SMP.
Yes, the Access Token is foreseen in the security concept, but it can currently not be used to identify users via the API. I like this request and will see, if I can squeeze it into 5.6.0 release, but I am not 100% sure I find the time to do so
OK. I'm looking forward to it. Thank you always.
Sorry, it doesn't make it in the 5.6.0 release
The API token will be implemented like a Bearer Token. So the Authorization HTTP header with the keyword Bearer must be used as in the following example:
GET /api/anything HTTP/1.1
Host: phosssmp.example.org
Accept: application/xml
Authorization: Bearer {userToken}
Part of SMP 6.0.7 release