Package com.iizix.server.push.engine.http
package com.iizix.server.push.engine.http
- ClassDescriptionThe user name and password of an
Authorization: Basicheader, decoded asPUSH-WIRE-CONTRACT.mdsection 3.2 says: the scheme compared case-insensitively, the credentials decoded from base64 as UTF-8 (RFC 7617charset) and split at the first colon, so a password may contain one.The Push Notification (PN) credentials ofPUSH-CREDENTIALS.md: the credentials file (sections 2 to 6 and 8), the users registered from Java (section 7) and the group definitions the database users are matched against (section 4).How anIZ1password is hashed and checked: the server's ownPasswordHasherin production, supplied so that a test needs no server.Supplies the engine's file watcher, creating it at the first file to watch.The parser of the Push Notification (PN) credentials file,PUSH-CREDENTIALS.mdsection 3: UTF-8, unix-style ini, a byte-order mark ignored, LF or CRLF,#or;comments, case-insensitive section names, the sections[users],[groups],[members]and[server], each optional and each at most once.A refusal or a warning of the parser: theILoglevel, the line (0 for a whole-file message) and the message, which never carries a line's content.The result of a parse: the valid entries and the diagnostics.The password storage types of section 3.2.A user of the[users]section.A refused request: the HTTP status, theerrorcode from the closed vocabulary ofPushWire.ERRORSand the humanmessage, plus any extra members the reply carries (a 409 carriesvapid_reasonandfcm_reason).The eightPOST /iizi-push/<operation>operations ofPUSH-WIRE-CONTRACT.mdversion 2, section 5:keys,subscribe,unsubscribe,reset,subscriptions,push,countandlist.Authenticates a request.An authenticated caller.The four privileges ofPUSH-WIRE-CONTRACT.mdsection 4, and the built-in group definitions ofPUSH-CREDENTIALS.mdsection 6 that apply while no credentials file is configured - the complete configured-nothing state this tree is in.The servlet that carries the eightPOST /iizi-push/<operation>operations ofPUSH-WIRE-CONTRACT.mdsection 5, registered byPushNotificationModulethroughIServer.registerServlet(PATH_SPEC,servlet)in the web server's root context, where it takes precedence over the default servlet by servlet-mapping precedence.The version 2 wire vocabulary ofPOST /iizi-push/<operation>: the operation names, the member names and the closed error vocabulary ofPUSH-WIRE-CONTRACT.mdsections 1, 2 and 5, in one place.The authenticator over the server's database users,PUSH-WIRE-CONTRACT.mdsections 3.2 and 3.3:Authorization: Basic, decoded as UTF-8 and split at the first colon, checked byUserAuthentication.getUser(conn,userName,password), which compares the clear-text password against the stored hash and never accepts the hash itself.