argument of type 'type' is not iterable

13 views
Skip to first unread message

Nicke

unread,
May 19, 2015, 5:40:23 AM5/19/15
to priva...@googlegroups.com
Am trying to test authentication against https://example.com/auth according to documentation at https://www.privacyidea.org/doc/current/modules/api/auth.html
I can no get this to work, what am I doing wrong?

root@aaa:~# curl -X POST https://aaa.vlan.io/auth -d 'username=nicke password=helloworld123456'
{
 
"id": 1,
 
"jsonrpc": "2.0",
 
"result": {
   
"error": {
     
"code": -500,
     
"message": "argument of type 'type' is not iterable"
   
},
   
"status": false
 
},
 
"version": "privacyIDEA 2.2.1"
}

OR
root@aaa:~# curl -H Accept:application/json -H Host:example.com -X POST https://example.com/auth -d 'username=nicke password=helloworld123456'
{
 
"id": 1,
 
"jsonrpc": "2.0",
 
"result": {
   
"error": {
     
"code": -500,
     
"message": "argument of type 'type' is not iterable"
   
},
   
"status": false
 
},
 
"version": "privacyIDEA 2.2.1"
}

OR:
root@aaa:~# curl -H Accept:application/json -H Host:example.com -X POST https://example.com/auth -H Content-Type:application/json -d '{"username":"niklas","password":"helloworld123456"}'
{
 
"id": 1,
 
"jsonrpc": "2.0",
 
"result": {
   
"error": {
     
"code": -500,
     
"message": "argument of type 'type' is not iterable"
   
},
   
"status": false
 
},
 
"version": "privacyIDEA 2.2.1"
}

Cornelius Kölbel

unread,
May 19, 2015, 5:44:44 AM5/19/15
to priva...@googlegroups.com
The Auth endpoint is only used when an administrator want to use the REST API to perform some tasks via the REST API.

If you want to check the users token, you can to this with the API
    http://privacyidea.readthedocs.org/en/latest/modules/api/validate.html#post--validate-samlcheck

Kind regards
Cornelius
--
You received this message because you are subscribed to the Google Groups "privacyidea" group.
To unsubscribe from this group and stop receiving emails from it, send an email to privacyidea...@googlegroups.com.
To post to this group, send email to priva...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/privacyidea/2db2e4ac-2e80-4af2-ab99-47af4e0afde1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Cornelius Kölbel
corneliu...@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel
signature.asc

Nicke

unread,
May 19, 2015, 5:47:16 AM5/19/15
to priva...@googlegroups.com
Aaaa, you are right, I missed that in the documentation. My bad.
Thanks for the fast response :)

Cornelius Kölbel

unread,
May 19, 2015, 5:49:14 AM5/19/15
to priva...@googlegroups.com
You can also test the token directly in the token detail view.
(See button "Test token" at the bottom)



Am 19.05.2015 um 11:47 schrieb Nicke:
Aaaa, you are right, I missed that in the documentation. My bad.
Thanks for the fast response :)
--
You received this message because you are subscribed to the Google Groups "privacyidea" group.
To unsubscribe from this group and stop receiving emails from it, send an email to privacyidea...@googlegroups.com.
To post to this group, send email to priva...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
signature.asc

Der PCFreak

unread,
May 19, 2015, 6:29:23 AM5/19/15
to priva...@googlegroups.com
Hi Nicke,

you could take a look at /usr/bin/privacyidea-fetchssh.sh if you want to do something with curl and the API.
Even this script is very poor written and maybe not ready for production use, you could get some useful information out of it.

I have a newer script which is not yet ready since I am waiting for an email from Cornelius about some questions.

@Cornelius
I wrote you an email some time ago about the fetching of ssh keys. Did you get the message and could you answer the questions?

Kind regards

PCFreak

Cornelius Kölbel

unread,
May 19, 2015, 6:34:51 AM5/19/15
to priva...@googlegroups.com
Hi PCFreak,

shame on me. I must have missed this!
Hit me again!

Kind regards
Cornelius

For more options, visit https://groups.google.com/d/optout.
signature.asc
Reply all
Reply to author
Forward
0 new messages