"headers": [
[
"Set-Cookie",
"ramses_auth_tkt=118c288d70246a38e4a9ab4df07accce37368eb2d73e6b8fe8eaf84b1e0aee7e8b3bb07df78d0882a59baaf712e2f71249ac42802d867e60f97fca9be0dc21c857f743a6Zm9vYmFy!userid_type:b64unicode; Path=/; HttpOnly"
],
what should the header be set to? this doesn't seem to be correct and tried most combinations I can think of Authorization=118c288d70246a38e4a9ab4df07accce37368eb2d73e6b8fe8eaf84b1e0aee7e8b3bb07df78d0882a59baaf712e2f71249ac42802d867e60f97fca9be0dc21c857f743a6Zm9vYmFy
thanks @kalyankuramana I have setup to use x_token_auth:
securedBy: [x_token_auth]
The issue I'm getting is that x_token_auth requires settings as per this comment:
https://github.com/ramses-tech/ramses/issues/97#issuecomment-160353919
...
- x_token_auth:
description: Authorization header token policy
type: x-ApiKey
settings:
foo: bar
...
if I run this I get this error which is fair enough, I'm not sure what parameters this accepts. Can't find references in the docs.
File "~/.virtualenvs/myenv/lib/python2.7/site-packages/ramses/auth.py", line 133, in _setup_apikey_policy
policy = ApiKeyAuthenticationPolicy(**params)
TypeError: __init__() got an unexpected keyword argument 'foo'
Using x_token_auth seems to register ok and return the token, only this setting doesn't generate the login, logout views. Maybe I'm missing something, or am I support to implement login/logout myself?
thanks
securedBy: [x_token_auth]
x_ticket_auth does:
securedBy: [x_ticket_auth]
POST http://localhost:6543/api/auth/token
{"login":"someUser", "password":"password"}
{
"headers": [
[
"WWW-Authenticate",
"ApiKey somUser:3ad6f8ab388d4be2b20a81b6c2fcc3dd"
]
],
"timestamp": "2016-10-11T04:22:57Z",
"title": "OK",
"status_code": 200,
"explanation": "",
"message": "Token claimed"
}
http --session=admin :6543/api/customers,nodes
http --session=admin :6543/api/customers _aggs.my_agg.terms.field==state
http --session=admin :6543/api/customers body=="{_source:false,aggs:{types:{terms:{field:\"type\"},aggs:{avg_id:{avg:{field:\"customer_id\"}}}}}}"
nefertari (0.7.0)
nefertari-sqla (0.4.2)
pyramid (1.7.3)
pyramid-jinja2 (2.6.2)
pyramid-sqlalchemy (1.6)
pyramid-tm (1.0)
ramses (0.5.3)
SQLAlchemy (1.1.2)
SQLAlchemy-Utils (0.32.9)