stdweird / p5-net-freeipa

Perl5 NET::FreeIPA (FreeIPA 4.2+ JSON API)
Apache License 2.0
4 stars 3 forks source link

UTF-8 support #6

Open stdweird opened 8 years ago

stdweird commented 8 years ago

IPA returns data encoded in utf-8. Check if this is correctly handled. Also, data should be send in utf8.

Example of user_show.

In this example employeeType has the value: Dado de baja automáticamente..

Send

{"params":[["notif362_industria"],{"version":"2.156","all":"1","raw":true}],"method":"user_show"}

Received

HTTP/1.1 200 Success
Connection: close
Date: Sat, 02 Apr 2016 19:59:49 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) mod_auth_gssapi/1.3.1 mod_nss/2.4.6 NSS/3.19.1 Basic ECC mod_wsgi/3.4 Python/2.7.5
Vary: Accept-Encoding
Content-Length: 2562
Content-Type: application/json; charset=utf-8
Client-Date: Sat, 02 Apr 2016 19:59:52 GMT
Client-Peer: 10.11.0.34:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /O=EXAMPLE.COM/CN=Certificate Authority
Client-SSL-Cert-Subject: /O=EXAMPLE.COM/CN=ipa.example.com
Client-SSL-Cipher: AES256-SHA
Client-SSL-Socket-Class: IO::Socket::SSL
Set-Cookie: ipa_session=c2369ac3a5ce75d7af408c1e2c6dfed2; Domain=ipa.example.com; Path=/ipa; Expires=Sat, 02 Apr 2016 20:19:49 GMT; Secure; HttpOnly

{
    "error": null, 
    "id": null, 
    "principal": "scripting@EXAMPLE.COM", 
    "result": {
        "result": {
            "cn": [
                "Juan Manuel Moreno"
            ], 
            "displayName": [
                "Juan Manuel Moreno"
            ], 
            "dn": "uid=notif362_industria,cn=users,cn=accounts,dc=example,dc=com", 
            "employeeType": [
                "Dado de baja autom\u00e1ticamente."
            ], 
            "gecos": [
                "Juan Manuel Moreno"
            ], 
            "gidnumber": [
                "228000176"
            ], 
            "givenname": [
                "Juan Manuel"
            ], 
            "has_keytab": [
                "TRUE"
            ], 
            "has_password": [
                "TRUE"
            ], 
            "homedirectory": [
                "/home/notif362_industria"
            ], 
            "initials": [
                "JM"
            ], 
            "ipaUniqueID": [
                "fb46d718-f5f5-11e5-ae9c-005056b63f59"
            ], 
            "krbLastPwdChange": [
                "20160402193345Z"
            ], 
            "krbPasswordExpiration": [
                "20160402193345Z"
            ], 
            "krbPrincipalName": [
                "notif362_industria@EXAMPLE.COM"
            ], 
            "loginshell": [
                "/bin/sh"
            ], 
            "mail": [
                "notif362_industria@example.com"
            ], 
            "memberof": [
                "cn=ipausers,cn=groups,cn=accounts,dc=example,dc=com"
            ], 
            "nsaccountlock": [
                "FALSE"
            ], 
            "objectClass": [
                "ipaobject", 
                "person", 
                "top", 
                "ipasshuser", 
                "inetorgperson", 
                "organizationalperson", 
                "krbticketpolicyaux", 
                "krbprincipalaux", 
                "inetuser", 
                "posixaccount", 
                "ipaSshGroupOfPubKeys", 
                "mepOriginEntry"
            ], 
            "sn": [
                "Moreno"
            ], 
            "title": [
                "Ninguno"
            ], 
            "uid": [
                "notif362_industria"
            ], 
            "uidnumber": [
                "228000176"
            ]
        }, 
        "summary": null, 
        "value": "notif362_industria"
    }, 
    "version": "4.2.0"
}