{"id":18823631,"url":"https://github.com/yvt/nexauth2","last_synced_at":"2025-04-14T01:31:07.275Z","repository":{"id":13589731,"uuid":"16282491","full_name":"yvt/nexauth2","owner":"yvt","description":"(abandoned) Encrypted Ajax without SSL (NEVER EVER use it in a real project — this does not protect your communication from MITM)","archived":true,"fork":false,"pushed_at":"2014-01-27T16:07:04.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T16:16:11.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yvt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-27T15:13:34.000Z","updated_at":"2023-04-11T00:34:40.000Z","dependencies_parsed_at":"2022-09-10T12:01:36.038Z","dependency_job_id":null,"html_url":"https://github.com/yvt/nexauth2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fnexauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fnexauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fnexauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Fnexauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yvt","download_url":"https://codeload.github.com/yvt/nexauth2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248807494,"owners_count":21164694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T00:54:13.318Z","updated_at":"2025-04-14T01:31:06.982Z","avatar_url":"https://github.com/yvt.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"NexAuth2\n========\n\nNexAuth2 provides an encrypted pull communication channel between a HTTP server and clients' \nweb browser without making use of SSL.\n\n* Encryption is done with JavaScript. No SSL servers required.\n* Every transmit data is strongly encrypted, making it practically impossible to eavesdrop the data.\n* Cross-domain request _is_ supported.\n\nArchitecture\n------------\n\nClient (JavaScript) sends an authenticated request to the NexAuth endpoint \nand the server returns the response to the client. This is similar to the way that non-streaming\nXMLHttpRequest does.\n\nTo accomplish a completely safe transmission, NexAuth2 makes use of both of the public-key \nencryption algorithm and shared-key one. First the client generate a private key and shared \nkey. And then it encrypts the shared key with the private key and sends it to the server. \nThe server decrypts the shared key with the public key, and uses it to encrypt further transmissions.\n\nOne of the most useful features of NexAuth is the user authentication. Upon establishing a session,\nthe client can provide a user name and password. This password is salted and hashed before being sent\nto the server, and thus, the clear password is kept in safe even when the secure connection is\ncompromised. \n\nRequirements\n------------\n\n* Java Servlet Container (Tomcat, Glassfish, etc...)\n* [Apache Commons Codec](http://commons.apache.org/proper/commons-codec/)\n* [Apache Commons Collections](http://commons.apache.org/proper/commons-collections/)\n* [Jackson JSON Processor](http://jackson.codehaus.org) - 2.1.1 or later recommended\n\nUsage\n-------------------\n\n### Server\n\nFirst, create a Java servlet class that inherits from `net.nexhawks.nexauth.NexAuthServlet`. After implementing\nsome member methods, add some command handlers that look like this:\n\n\tpublic NexAuthParams cmd_CommandNameHere(Command cmd) throws NexAuthException\n\nThe best example on how to implement this can be found at [NexAuthServet.java](src/net/nexhawks/nexauth/NexAuthServlet.java) `cmd_GetNexAuthVersion` member method.\n\n### Client\n\nSee [demo.html](client-library/demo.html).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvt%2Fnexauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyvt%2Fnexauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvt%2Fnexauth2/lists"}