openstack - How to get token ID in keystoneclient v3 -
i got token id in kystoneclient v2 command:
token = keystone.auth_ref['token']['id']
but when move kystoneclient v3, please kindly let me know how can token id. try same above command. error.
in keystone client v3, authentication response returns token id in header rather in response body, named "x-subject-token".
you can see changes here:
i had tried token perl this:
my $res = $agent->post( $self->{auth_url} . "/auth/tokens", content_type => 'application/json', content => to_json($authkeystone) ); $headerdata = $res->{_headers}; $tokenid = $headerdata->{'x-subject-token'};
it works!
Comments
Post a Comment