Argument of type 'type' is not iterable

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”
}

Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wZ3Atc2lnbmF0dXJlOyBuYW1lPSJzaWduYXR1cmUu
YXNjIg0KQ29udGVudC1EZXNjcmlwdGlvbjogT3BlblBHUCBkaWdpdGFsIHNpZ25hdHVyZQ0KQ29u
dGVudC1EaXNwb3NpdGlvbjogYXR0YWNobWVudDsgZmlsZW5hbWU9InNpZ25hdHVyZS5hc2MiDQoN
Ci0tLS0tQkVHSU4gUEdQIFNJR05BVFVSRS0tLS0tDQpWZXJzaW9uOiBHbnVQRyB2MQ0KDQppUUlj
QkFFQkFnQUdCUUpWV3djWEFBb0pFQkJoWkZVdWpZRkpkdWNRQUlMT0hjb2JST2x2RVRydTlwZGkz
azFhDQpuSlBkeGNvYUVVL2RsT21rNG50S1RoTldGaENvK3BIVTRxbWg5d2c3SENKQUxtNFJTVmd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nDQpTY3VmYXdYMklRaUNIcmxzQWtrTXEycEs1bjYv
YXFMRlhXbGRwbkt6Sld6U2tmMm0xQkl1MUZTa290U2lKa1g3DQovTHhaR1VZNGZDeEpIa3I3M1Zt
QQ0KPVB2dGYNCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ0K

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

PCFreakOn 19.05.2015 11:44, Cornelius Kölbel wrote:

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

Am 19.05.2015 um 11:40 schrieb Nicke:

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”
}
|


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+unsubscribe@googlegroups.com
mailto:privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com
mailto:privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/2db2e4ac-2e80-4af2-ab99-47af4e0afde1%40googlegroups.com
https://groups.google.com/d/msgid/privacyidea/2db2e4ac-2e80-4af2-ab99-47af4e0afde1%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
cornelius.koelbel@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

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+unsubscribe@googlegroups.com
mailto:privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com
mailto:privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/555B0601.9020407%40netknights.it
https://groups.google.com/d/msgid/privacyidea/555B0601.9020407%40netknights.it?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Aaaa, you are right, I missed that in the documentation. My bad.
Thanks for the fast response :slight_smile:

Q29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wZ3Atc2lnbmF0dXJlOyBuYW1lPSJzaWduYXR1cmUu
YXNjIg0KQ29udGVudC1EZXNjcmlwdGlvbjogT3BlblBHUCBkaWdpdGFsIHNpZ25hdHVyZQ0KQ29u
dGVudC1EaXNwb3NpdGlvbjogYXR0YWNobWVudDsg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