├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── CB-manifest.json ├── CB-worker.js ├── README.md ├── TODO.txt ├── assets ├── .htaccess ├── CB-autocomplete.js ├── PAGE-cb.css ├── PAGE-cb.js ├── PAGE-cbwork.js ├── PAGE-check.js ├── PAGE-cus.js ├── PAGE-deliver.js ├── PAGE-forgot.js ├── PAGE-home.js ├── PAGE-import.js ├── PAGE-items-check.js ├── PAGE-items.js ├── PAGE-login.css ├── PAGE-login.js ├── PAGE-move.js ├── PAGE-nfc.js ├── PAGE-purchase.js ├── PAGE-push.js ├── PAGE-qrscan.js ├── PAGE-scanner.css ├── PAGE-settings.js ├── PAGE-sup-items.js ├── PAGE-sup.js ├── PAGE-users.js ├── PAGE-wa-helper.js ├── PAGE-wa.js ├── REPORT-order.css ├── REPORT-qr.css ├── banner.webp ├── bootstrap.bundle.min.js ├── bootstrap.bundle.min.js.map ├── bootstrap.min.css ├── bootstrap.min.css.map ├── csv.min.js ├── dummy-customers.csv ├── dummy-items.csv ├── dummy-supplier-items.csv ├── dummy-suppliers.csv ├── dummy-users.csv ├── favicon.png ├── html5-qrcode.min.js ├── ico-512.png ├── icomoon.woff ├── qrcode.min.js ├── storage-boxx-1.png ├── storage-boxx-2.png ├── storage-boxx-3.png ├── storage-boxx-4.png ├── storage-boxx-5.png ├── storage-boxx-6.png ├── tsparticles.confetti.bundle.min.js └── users.webp ├── index.php ├── lib ├── .htaccess ├── API-autocomplete.php ├── API-customers.php ├── API-delivery.php ├── API-items.php ├── API-move.php ├── API-purchase.php ├── API-push.php ├── API-session.php ├── API-settings.php ├── API-suppliers.php ├── API-users.php ├── CORE-Config.php ├── CORE-Go.php ├── CORE-Install-HTML.php ├── CORE-Install-JS.php ├── CORE-Install.php ├── HOOK-API-CORS.php ├── HOOK-Routes.php ├── HOOK-SESS-Load.php ├── HOOK-SESS-Save.php ├── JWT │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ ├── installed.php │ │ └── platform_check.php │ └── firebase │ │ └── php-jwt │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ ├── BeforeValidException.php │ │ ├── CachedKeySet.php │ │ ├── ExpiredException.php │ │ ├── JWK.php │ │ ├── JWT.php │ │ ├── JWTExceptionWithPayloadInterface.php │ │ ├── Key.php │ │ └── SignatureInvalidException.php ├── LIB-Autocomplete.php ├── LIB-CCache.php ├── LIB-Core.php ├── LIB-Customers.php ├── LIB-DB.php ├── LIB-Delivery.php ├── LIB-Forgot.php ├── LIB-Install.php ├── LIB-Items.php ├── LIB-MInstall.php ├── LIB-Mail.php ├── LIB-Move.php ├── LIB-NFCIN.php ├── LIB-Page.php ├── LIB-Purchase.php ├── LIB-Push.php ├── LIB-QRIN.php ├── LIB-Report.php ├── LIB-Route.php ├── LIB-Session.php ├── LIB-Settings.php ├── LIB-Suppliers.php ├── LIB-Users.php ├── LIB-WAIN.php ├── SQL-Storage-Boxx-0.sql ├── WebAuthn │ ├── autoload.php │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ ├── installed.php │ │ └── platform_check.php │ └── lbuchs │ │ └── webauthn │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── _test │ │ ├── client.html │ │ ├── rootCertificates │ │ │ ├── apple.pem │ │ │ ├── globalSign.pem │ │ │ ├── googleHardware.pem │ │ │ ├── hypersecu.pem │ │ │ ├── mds │ │ │ │ └── .gitkeep │ │ │ ├── microsoftTpmCollection.pem │ │ │ ├── solo.pem │ │ │ └── yubico.pem │ │ └── server.php │ │ ├── composer.json │ │ └── src │ │ ├── Attestation │ │ ├── AttestationObject.php │ │ ├── AuthenticatorData.php │ │ └── Format │ │ │ ├── AndroidKey.php │ │ │ ├── AndroidSafetyNet.php │ │ │ ├── Apple.php │ │ │ ├── FormatBase.php │ │ │ ├── None.php │ │ │ ├── Packed.php │ │ │ ├── Tpm.php │ │ │ └── U2f.php │ │ ├── Binary │ │ └── ByteBuffer.php │ │ ├── CBOR │ │ └── CborDecoder.php │ │ ├── WebAuthn.php │ │ └── WebAuthnException.php └── webpush │ ├── autoload.php │ ├── brick │ └── math │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── composer.json │ │ └── src │ │ ├── BigDecimal.php │ │ ├── BigInteger.php │ │ ├── BigNumber.php │ │ ├── BigRational.php │ │ ├── Exception │ │ ├── DivisionByZeroException.php │ │ ├── IntegerOverflowException.php │ │ ├── MathException.php │ │ ├── NegativeNumberException.php │ │ ├── NumberFormatException.php │ │ └── RoundingNecessaryException.php │ │ ├── Internal │ │ ├── Calculator.php │ │ └── Calculator │ │ │ ├── BcMathCalculator.php │ │ │ ├── GmpCalculator.php │ │ │ └── NativeCalculator.php │ │ └── RoundingMode.php │ ├── composer │ ├── ClassLoader.php │ ├── InstalledVersions.php │ ├── LICENSE │ ├── autoload_classmap.php │ ├── autoload_files.php │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── autoload_real.php │ ├── autoload_static.php │ ├── installed.json │ ├── installed.php │ └── platform_check.php │ ├── guzzlehttp │ ├── guzzle │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── UPGRADING.md │ │ ├── composer.json │ │ └── src │ │ │ ├── BodySummarizer.php │ │ │ ├── BodySummarizerInterface.php │ │ │ ├── Client.php │ │ │ ├── ClientInterface.php │ │ │ ├── ClientTrait.php │ │ │ ├── Cookie │ │ │ ├── CookieJar.php │ │ │ ├── CookieJarInterface.php │ │ │ ├── FileCookieJar.php │ │ │ ├── SessionCookieJar.php │ │ │ └── SetCookie.php │ │ │ ├── Exception │ │ │ ├── BadResponseException.php │ │ │ ├── ClientException.php │ │ │ ├── ConnectException.php │ │ │ ├── GuzzleException.php │ │ │ ├── InvalidArgumentException.php │ │ │ ├── RequestException.php │ │ │ ├── ServerException.php │ │ │ ├── TooManyRedirectsException.php │ │ │ └── TransferException.php │ │ │ ├── Handler │ │ │ ├── CurlFactory.php │ │ │ ├── CurlFactoryInterface.php │ │ │ ├── CurlHandler.php │ │ │ ├── CurlMultiHandler.php │ │ │ ├── EasyHandle.php │ │ │ ├── HeaderProcessor.php │ │ │ ├── MockHandler.php │ │ │ ├── Proxy.php │ │ │ └── StreamHandler.php │ │ │ ├── HandlerStack.php │ │ │ ├── MessageFormatter.php │ │ │ ├── MessageFormatterInterface.php │ │ │ ├── Middleware.php │ │ │ ├── Pool.php │ │ │ ├── PrepareBodyMiddleware.php │ │ │ ├── RedirectMiddleware.php │ │ │ ├── RequestOptions.php │ │ │ ├── RetryMiddleware.php │ │ │ ├── TransferStats.php │ │ │ ├── Utils.php │ │ │ ├── functions.php │ │ │ └── functions_include.php │ ├── promises │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── src │ │ │ ├── AggregateException.php │ │ │ ├── CancellationException.php │ │ │ ├── Coroutine.php │ │ │ ├── Create.php │ │ │ ├── Each.php │ │ │ ├── EachPromise.php │ │ │ ├── FulfilledPromise.php │ │ │ ├── Is.php │ │ │ ├── Promise.php │ │ │ ├── PromiseInterface.php │ │ │ ├── PromisorInterface.php │ │ │ ├── RejectedPromise.php │ │ │ ├── RejectionException.php │ │ │ ├── TaskQueue.php │ │ │ ├── TaskQueueInterface.php │ │ │ └── Utils.php │ │ └── vendor-bin │ │ │ ├── php-cs-fixer │ │ │ └── composer.json │ │ │ ├── phpstan │ │ │ └── composer.json │ │ │ └── psalm │ │ │ └── composer.json │ └── psr7 │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ ├── AppendStream.php │ │ ├── BufferStream.php │ │ ├── CachingStream.php │ │ ├── DroppingStream.php │ │ ├── Exception │ │ └── MalformedUriException.php │ │ ├── FnStream.php │ │ ├── Header.php │ │ ├── HttpFactory.php │ │ ├── InflateStream.php │ │ ├── LazyOpenStream.php │ │ ├── LimitStream.php │ │ ├── Message.php │ │ ├── MessageTrait.php │ │ ├── MimeType.php │ │ ├── MultipartStream.php │ │ ├── NoSeekStream.php │ │ ├── PumpStream.php │ │ ├── Query.php │ │ ├── Request.php │ │ ├── Response.php │ │ ├── Rfc7230.php │ │ ├── ServerRequest.php │ │ ├── Stream.php │ │ ├── StreamDecoratorTrait.php │ │ ├── StreamWrapper.php │ │ ├── UploadedFile.php │ │ ├── Uri.php │ │ ├── UriComparator.php │ │ ├── UriNormalizer.php │ │ ├── UriResolver.php │ │ └── Utils.php │ ├── minishlink │ └── web-push │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── phpstan.neon │ │ └── src │ │ ├── Encryption.php │ │ ├── MessageSentReport.php │ │ ├── Notification.php │ │ ├── Subscription.php │ │ ├── SubscriptionInterface.php │ │ ├── Utils.php │ │ ├── VAPID.php │ │ └── WebPush.php │ ├── paragonie │ └── constant_time_encoding │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ ├── Base32.php │ │ ├── Base32Hex.php │ │ ├── Base64.php │ │ ├── Base64DotSlash.php │ │ ├── Base64DotSlashOrdered.php │ │ ├── Base64UrlSafe.php │ │ ├── Binary.php │ │ ├── EncoderInterface.php │ │ ├── Encoding.php │ │ ├── Hex.php │ │ └── RFC4648.php │ ├── psr │ ├── http-client │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ │ ├── ClientExceptionInterface.php │ │ │ ├── ClientInterface.php │ │ │ ├── NetworkExceptionInterface.php │ │ │ └── RequestExceptionInterface.php │ ├── http-factory │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ │ ├── RequestFactoryInterface.php │ │ │ ├── ResponseFactoryInterface.php │ │ │ ├── ServerRequestFactoryInterface.php │ │ │ ├── StreamFactoryInterface.php │ │ │ ├── UploadedFileFactoryInterface.php │ │ │ └── UriFactoryInterface.php │ └── http-message │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ ├── docs │ │ ├── PSR7-Interfaces.md │ │ └── PSR7-Usage.md │ │ └── src │ │ ├── MessageInterface.php │ │ ├── RequestInterface.php │ │ ├── ResponseInterface.php │ │ ├── ServerRequestInterface.php │ │ ├── StreamInterface.php │ │ ├── UploadedFileInterface.php │ │ └── UriInterface.php │ ├── ralouphie │ └── getallheaders │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ └── getallheaders.php │ ├── spomky-labs │ ├── base64url │ │ ├── .github │ │ │ └── FUNDING.yml │ │ ├── LICENSE │ │ ├── composer.json │ │ └── src │ │ │ └── Base64Url.php │ └── pki-framework │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── composer.json │ │ └── src │ │ ├── ASN1 │ │ ├── Component │ │ │ ├── Identifier.php │ │ │ └── Length.php │ │ ├── DERData.php │ │ ├── Element.php │ │ ├── Exception │ │ │ └── DecodeException.php │ │ ├── Feature │ │ │ ├── ElementBase.php │ │ │ ├── Encodable.php │ │ │ └── Stringable.php │ │ ├── Type │ │ │ ├── BaseString.php │ │ │ ├── BaseTime.php │ │ │ ├── Constructed │ │ │ │ ├── ConstructedString.php │ │ │ │ ├── Sequence.php │ │ │ │ └── Set.php │ │ │ ├── Primitive │ │ │ │ ├── BMPString.php │ │ │ │ ├── BitString.php │ │ │ │ ├── Boolean.php │ │ │ │ ├── CharacterString.php │ │ │ │ ├── EOC.php │ │ │ │ ├── Enumerated.php │ │ │ │ ├── GeneralString.php │ │ │ │ ├── GeneralizedTime.php │ │ │ │ ├── GraphicString.php │ │ │ │ ├── IA5String.php │ │ │ │ ├── Integer.php │ │ │ │ ├── NullType.php │ │ │ │ ├── Number.php │ │ │ │ ├── NumericString.php │ │ │ │ ├── ObjectDescriptor.php │ │ │ │ ├── ObjectIdentifier.php │ │ │ │ ├── OctetString.php │ │ │ │ ├── PrintableString.php │ │ │ │ ├── Real.php │ │ │ │ ├── RelativeOID.php │ │ │ │ ├── T61String.php │ │ │ │ ├── UTCTime.php │ │ │ │ ├── UTF8String.php │ │ │ │ ├── UniversalString.php │ │ │ │ ├── VideotexString.php │ │ │ │ └── VisibleString.php │ │ │ ├── PrimitiveString.php │ │ │ ├── PrimitiveType.php │ │ │ ├── StringType.php │ │ │ ├── Structure.php │ │ │ ├── Tagged │ │ │ │ ├── ApplicationType.php │ │ │ │ ├── ContextSpecificType.php │ │ │ │ ├── DERTaggedType.php │ │ │ │ ├── ExplicitTagging.php │ │ │ │ ├── ExplicitlyTaggedType.php │ │ │ │ ├── ImplicitTagging.php │ │ │ │ ├── ImplicitlyTaggedType.php │ │ │ │ ├── PrivateType.php │ │ │ │ └── TaggedTypeWrap.php │ │ │ ├── TaggedType.php │ │ │ ├── TimeType.php │ │ │ ├── UniversalClass.php │ │ │ └── UnspecifiedType.php │ │ └── Util │ │ │ ├── BigInt.php │ │ │ └── Flags.php │ │ ├── CryptoBridge │ │ ├── Crypto.php │ │ └── Crypto │ │ │ └── OpenSSLCrypto.php │ │ ├── CryptoEncoding │ │ ├── PEM.php │ │ └── PEMBundle.php │ │ ├── CryptoTypes │ │ ├── AlgorithmIdentifier │ │ │ ├── AlgorithmIdentifier.php │ │ │ ├── AlgorithmIdentifierFactory.php │ │ │ ├── AlgorithmIdentifierProvider.php │ │ │ ├── Asymmetric │ │ │ │ ├── ECPublicKeyAlgorithmIdentifier.php │ │ │ │ ├── Ed25519AlgorithmIdentifier.php │ │ │ │ ├── Ed448AlgorithmIdentifier.php │ │ │ │ ├── RFC8410EdAlgorithmIdentifier.php │ │ │ │ ├── RFC8410XAlgorithmIdentifier.php │ │ │ │ ├── RSAEncryptionAlgorithmIdentifier.php │ │ │ │ ├── X25519AlgorithmIdentifier.php │ │ │ │ └── X448AlgorithmIdentifier.php │ │ │ ├── Cipher │ │ │ │ ├── AES128CBCAlgorithmIdentifier.php │ │ │ │ ├── AES192CBCAlgorithmIdentifier.php │ │ │ │ ├── AES256CBCAlgorithmIdentifier.php │ │ │ │ ├── AESCBCAlgorithmIdentifier.php │ │ │ │ ├── BlockCipherAlgorithmIdentifier.php │ │ │ │ ├── CipherAlgorithmIdentifier.php │ │ │ │ ├── DESCBCAlgorithmIdentifier.php │ │ │ │ ├── DESEDE3CBCAlgorithmIdentifier.php │ │ │ │ └── RC2CBCAlgorithmIdentifier.php │ │ │ ├── Feature │ │ │ │ ├── AlgorithmIdentifierType.php │ │ │ │ ├── AsymmetricCryptoAlgorithmIdentifier.php │ │ │ │ ├── EncryptionAlgorithmIdentifier.php │ │ │ │ ├── HashAlgorithmIdentifier.php │ │ │ │ ├── PRFAlgorithmIdentifier.php │ │ │ │ └── SignatureAlgorithmIdentifier.php │ │ │ ├── GenericAlgorithmIdentifier.php │ │ │ ├── Hash │ │ │ │ ├── HMACWithSHA1AlgorithmIdentifier.php │ │ │ │ ├── HMACWithSHA224AlgorithmIdentifier.php │ │ │ │ ├── HMACWithSHA256AlgorithmIdentifier.php │ │ │ │ ├── HMACWithSHA384AlgorithmIdentifier.php │ │ │ │ ├── HMACWithSHA512AlgorithmIdentifier.php │ │ │ │ ├── MD5AlgorithmIdentifier.php │ │ │ │ ├── RFC4231HMACAlgorithmIdentifier.php │ │ │ │ ├── SHA1AlgorithmIdentifier.php │ │ │ │ ├── SHA224AlgorithmIdentifier.php │ │ │ │ ├── SHA256AlgorithmIdentifier.php │ │ │ │ ├── SHA2AlgorithmIdentifier.php │ │ │ │ ├── SHA384AlgorithmIdentifier.php │ │ │ │ └── SHA512AlgorithmIdentifier.php │ │ │ ├── Signature │ │ │ │ ├── ECDSAWithSHA1AlgorithmIdentifier.php │ │ │ │ ├── ECDSAWithSHA224AlgorithmIdentifier.php │ │ │ │ ├── ECDSAWithSHA256AlgorithmIdentifier.php │ │ │ │ ├── ECDSAWithSHA384AlgorithmIdentifier.php │ │ │ │ ├── ECDSAWithSHA512AlgorithmIdentifier.php │ │ │ │ ├── ECSignatureAlgorithmIdentifier.php │ │ │ │ ├── MD2WithRSAEncryptionAlgorithmIdentifier.php │ │ │ │ ├── MD4WithRSAEncryptionAlgorithmIdentifier.php │ │ │ │ ├── MD5WithRSAEncryptionAlgorithmIdentifier.php │ │ │ │ ├── RFC3279RSASignatureAlgorithmIdentifier.php │ │ │ │ ├── RFC4055RSASignatureAlgorithmIdentifier.php │ │ │ │ ├── RSASignatureAlgorithmIdentifier.php │ │ │ │ ├── SHA1WithRSAEncryptionAlgorithmIdentifier.php │ │ │ │ ├── SHA224WithRSAEncryptionAlgorithmIdentifier.php │ │ │ │ ├── SHA256WithRSAEncryptionAlgorithmIdentifier.php │ │ │ │ ├── SHA384WithRSAEncryptionAlgorithmIdentifier.php │ │ │ │ └── SHA512WithRSAEncryptionAlgorithmIdentifier.php │ │ │ └── SpecificAlgorithmIdentifier.php │ │ ├── Asymmetric │ │ │ ├── Attribute │ │ │ │ └── OneAsymmetricKeyAttributes.php │ │ │ ├── EC │ │ │ │ ├── ECConversion.php │ │ │ │ ├── ECPrivateKey.php │ │ │ │ └── ECPublicKey.php │ │ │ ├── OneAsymmetricKey.php │ │ │ ├── PrivateKey.php │ │ │ ├── PrivateKeyInfo.php │ │ │ ├── PublicKey.php │ │ │ ├── PublicKeyInfo.php │ │ │ ├── RFC8410 │ │ │ │ ├── Curve25519 │ │ │ │ │ ├── Curve25519PrivateKey.php │ │ │ │ │ ├── Curve25519PublicKey.php │ │ │ │ │ ├── Ed25519PrivateKey.php │ │ │ │ │ ├── Ed25519PublicKey.php │ │ │ │ │ ├── X25519PrivateKey.php │ │ │ │ │ └── X25519PublicKey.php │ │ │ │ ├── Curve448 │ │ │ │ │ ├── Ed448PrivateKey.php │ │ │ │ │ ├── Ed448PublicKey.php │ │ │ │ │ ├── X448PrivateKey.php │ │ │ │ │ └── X448PublicKey.php │ │ │ │ ├── RFC8410PrivateKey.php │ │ │ │ └── RFC8410PublicKey.php │ │ │ └── RSA │ │ │ │ ├── RSAPrivateKey.php │ │ │ │ └── RSAPublicKey.php │ │ └── Signature │ │ │ ├── ECSignature.php │ │ │ ├── Ed25519Signature.php │ │ │ ├── Ed448Signature.php │ │ │ ├── GenericSignature.php │ │ │ ├── RSASignature.php │ │ │ └── Signature.php │ │ ├── X501 │ │ ├── ASN1 │ │ │ ├── Attribute.php │ │ │ ├── AttributeType.php │ │ │ ├── AttributeTypeAndValue.php │ │ │ ├── AttributeValue │ │ │ │ ├── AttributeValue.php │ │ │ │ ├── CommonNameValue.php │ │ │ │ ├── CountryNameValue.php │ │ │ │ ├── DescriptionValue.php │ │ │ │ ├── Feature │ │ │ │ │ ├── DirectoryString.php │ │ │ │ │ └── PrintableStringValue.php │ │ │ │ ├── GivenNameValue.php │ │ │ │ ├── LocalityNameValue.php │ │ │ │ ├── NameValue.php │ │ │ │ ├── OrganizationNameValue.php │ │ │ │ ├── OrganizationalUnitNameValue.php │ │ │ │ ├── PseudonymValue.php │ │ │ │ ├── SerialNumberValue.php │ │ │ │ ├── StateOrProvinceNameValue.php │ │ │ │ ├── SurnameValue.php │ │ │ │ ├── TitleValue.php │ │ │ │ └── UnknownAttributeValue.php │ │ │ ├── Collection │ │ │ │ ├── AttributeCollection.php │ │ │ │ ├── SequenceOfAttributes.php │ │ │ │ └── SetOfAttributes.php │ │ │ ├── Name.php │ │ │ └── RDN.php │ │ ├── DN │ │ │ └── DNParser.php │ │ ├── MatchingRule │ │ │ ├── BinaryMatch.php │ │ │ ├── CaseExactMatch.php │ │ │ ├── CaseIgnoreMatch.php │ │ │ ├── MatchingRule.php │ │ │ └── StringPrepMatchingRule.php │ │ └── StringPrep │ │ │ ├── CheckBidiStep.php │ │ │ ├── InsignificantNonSubstringSpaceStep.php │ │ │ ├── MapStep.php │ │ │ ├── NormalizeStep.php │ │ │ ├── PrepareStep.php │ │ │ ├── ProhibitStep.php │ │ │ ├── StringPreparer.php │ │ │ └── TranscodeStep.php │ │ └── X509 │ │ ├── AttributeCertificate │ │ ├── AttCertIssuer.php │ │ ├── AttCertValidityPeriod.php │ │ ├── Attribute │ │ │ ├── AccessIdentityAttributeValue.php │ │ │ ├── AuthenticationInfoAttributeValue.php │ │ │ ├── ChargingIdentityAttributeValue.php │ │ │ ├── GroupAttributeValue.php │ │ │ ├── IetfAttrSyntax.php │ │ │ ├── IetfAttrValue.php │ │ │ ├── RoleAttributeValue.php │ │ │ └── SvceAuthInfo.php │ │ ├── AttributeCertificate.php │ │ ├── AttributeCertificateInfo.php │ │ ├── Attributes.php │ │ ├── Holder.php │ │ ├── IssuerSerial.php │ │ ├── ObjectDigestInfo.php │ │ ├── V2Form.php │ │ └── Validation │ │ │ ├── ACValidationConfig.php │ │ │ ├── ACValidator.php │ │ │ └── Exception │ │ │ └── ACValidationException.php │ │ ├── Certificate │ │ ├── Certificate.php │ │ ├── CertificateBundle.php │ │ ├── CertificateChain.php │ │ ├── Extension │ │ │ ├── AAControlsExtension.php │ │ │ ├── AccessDescription │ │ │ │ ├── AccessDescription.php │ │ │ │ ├── AuthorityAccessDescription.php │ │ │ │ └── SubjectAccessDescription.php │ │ │ ├── AuthorityInformationAccessExtension.php │ │ │ ├── AuthorityKeyIdentifierExtension.php │ │ │ ├── BasicConstraintsExtension.php │ │ │ ├── CRLDistributionPointsExtension.php │ │ │ ├── CertificatePoliciesExtension.php │ │ │ ├── CertificatePolicy │ │ │ │ ├── CPSQualifier.php │ │ │ │ ├── DisplayText.php │ │ │ │ ├── NoticeReference.php │ │ │ │ ├── PolicyInformation.php │ │ │ │ ├── PolicyQualifierInfo.php │ │ │ │ └── UserNoticeQualifier.php │ │ │ ├── DistributionPoint │ │ │ │ ├── DistributionPoint.php │ │ │ │ ├── DistributionPointName.php │ │ │ │ ├── FullName.php │ │ │ │ ├── ReasonFlags.php │ │ │ │ └── RelativeName.php │ │ │ ├── ExtendedKeyUsageExtension.php │ │ │ ├── Extension.php │ │ │ ├── FreshestCRLExtension.php │ │ │ ├── InhibitAnyPolicyExtension.php │ │ │ ├── IssuerAlternativeNameExtension.php │ │ │ ├── KeyUsageExtension.php │ │ │ ├── NameConstraints │ │ │ │ ├── GeneralSubtree.php │ │ │ │ └── GeneralSubtrees.php │ │ │ ├── NameConstraintsExtension.php │ │ │ ├── NoRevocationAvailableExtension.php │ │ │ ├── PolicyConstraintsExtension.php │ │ │ ├── PolicyMappings │ │ │ │ └── PolicyMapping.php │ │ │ ├── PolicyMappingsExtension.php │ │ │ ├── SubjectAlternativeNameExtension.php │ │ │ ├── SubjectDirectoryAttributesExtension.php │ │ │ ├── SubjectInformationAccessExtension.php │ │ │ ├── SubjectKeyIdentifierExtension.php │ │ │ ├── Target │ │ │ │ ├── Target.php │ │ │ │ ├── TargetGroup.php │ │ │ │ ├── TargetName.php │ │ │ │ └── Targets.php │ │ │ ├── TargetInformationExtension.php │ │ │ └── UnknownExtension.php │ │ ├── Extensions.php │ │ ├── TBSCertificate.php │ │ ├── Time.php │ │ ├── UniqueIdentifier.php │ │ └── Validity.php │ │ ├── CertificationPath │ │ ├── CertificationPath.php │ │ ├── Exception │ │ │ ├── PathBuildingException.php │ │ │ └── PathValidationException.php │ │ ├── PathBuilding │ │ │ └── CertificationPathBuilder.php │ │ ├── PathValidation │ │ │ ├── PathValidationConfig.php │ │ │ ├── PathValidationResult.php │ │ │ ├── PathValidator.php │ │ │ └── ValidatorState.php │ │ └── Policy │ │ │ ├── PolicyNode.php │ │ │ └── PolicyTree.php │ │ ├── CertificationRequest │ │ ├── Attribute │ │ │ └── ExtensionRequestValue.php │ │ ├── Attributes.php │ │ ├── CertificationRequest.php │ │ └── CertificationRequestInfo.php │ │ ├── Exception │ │ └── X509ValidationException.php │ │ ├── Feature │ │ └── DateTimeHelper.php │ │ └── GeneralName │ │ ├── DNSName.php │ │ ├── DirectoryName.php │ │ ├── EDIPartyName.php │ │ ├── GeneralName.php │ │ ├── GeneralNames.php │ │ ├── IPAddress.php │ │ ├── IPv4Address.php │ │ ├── IPv6Address.php │ │ ├── OtherName.php │ │ ├── RFC822Name.php │ │ ├── RegisteredID.php │ │ ├── UniformResourceIdentifier.php │ │ └── X400Address.php │ ├── symfony │ └── deprecation-contracts │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── function.php │ └── web-token │ ├── jwt-core │ ├── .github │ │ ├── CONTRIBUTING.md │ │ ├── FUNDING.yml │ │ └── PULL_REQUEST_TEMPLATE.md │ ├── Algorithm.php │ ├── AlgorithmManager.php │ ├── AlgorithmManagerFactory.php │ ├── JWK.php │ ├── JWKSet.php │ ├── JWT.php │ ├── LICENSE │ ├── README.md │ ├── Util │ │ ├── BigInteger.php │ │ ├── ECKey.php │ │ ├── ECSignature.php │ │ ├── Hash.php │ │ ├── JsonConverter.php │ │ ├── KeyChecker.php │ │ └── RSAKey.php │ └── composer.json │ ├── jwt-key-mgmt │ ├── .github │ │ ├── CONTRIBUTING.md │ │ ├── FUNDING.yml │ │ └── PULL_REQUEST_TEMPLATE.md │ ├── Analyzer │ │ ├── AlgorithmAnalyzer.php │ │ ├── ES256KeyAnalyzer.php │ │ ├── ES384KeyAnalyzer.php │ │ ├── ES512KeyAnalyzer.php │ │ ├── ESKeyAnalyzer.php │ │ ├── HS256KeyAnalyzer.php │ │ ├── HS384KeyAnalyzer.php │ │ ├── HS512KeyAnalyzer.php │ │ ├── HSKeyAnalyzer.php │ │ ├── KeyAnalyzer.php │ │ ├── KeyAnalyzerManager.php │ │ ├── KeyIdentifierAnalyzer.php │ │ ├── KeysetAnalyzer.php │ │ ├── KeysetAnalyzerManager.php │ │ ├── Message.php │ │ ├── MessageBag.php │ │ ├── MixedKeyTypes.php │ │ ├── MixedPublicAndPrivateKeys.php │ │ ├── NoneAnalyzer.php │ │ ├── OctAnalyzer.php │ │ ├── RsaAnalyzer.php │ │ ├── UsageAnalyzer.php │ │ └── ZxcvbnKeyAnalyzer.php │ ├── JKUFactory.php │ ├── JWKFactory.php │ ├── KeyConverter │ │ ├── ECKey.php │ │ ├── KeyConverter.php │ │ └── RSAKey.php │ ├── LICENSE │ ├── README.md │ ├── UrlKeySetFactory.php │ ├── X5UFactory.php │ └── composer.json │ ├── jwt-signature-algorithm-ecdsa │ ├── .github │ │ ├── CONTRIBUTING.md │ │ ├── FUNDING.yml │ │ └── PULL_REQUEST_TEMPLATE.md │ ├── ECDSA.php │ ├── ES256.php │ ├── ES384.php │ ├── ES512.php │ ├── LICENSE │ ├── README.md │ └── composer.json │ ├── jwt-signature │ ├── .github │ │ ├── CONTRIBUTING.md │ │ ├── FUNDING.yml │ │ └── PULL_REQUEST_TEMPLATE.md │ ├── Algorithm │ │ ├── MacAlgorithm.php │ │ └── SignatureAlgorithm.php │ ├── JWS.php │ ├── JWSBuilder.php │ ├── JWSBuilderFactory.php │ ├── JWSLoader.php │ ├── JWSLoaderFactory.php │ ├── JWSTokenSupport.php │ ├── JWSVerifier.php │ ├── JWSVerifierFactory.php │ ├── LICENSE │ ├── README.md │ ├── Serializer │ │ ├── CompactSerializer.php │ │ ├── JSONFlattenedSerializer.php │ │ ├── JSONGeneralSerializer.php │ │ ├── JWSSerializer.php │ │ ├── JWSSerializerManager.php │ │ ├── JWSSerializerManagerFactory.php │ │ └── Serializer.php │ ├── Signature.php │ └── composer.json │ └── jwt-util-ecc │ ├── .github │ ├── CONTRIBUTING.md │ ├── FUNDING.yml │ └── PULL_REQUEST_TEMPLATE.md │ ├── Curve.php │ ├── EcDH.php │ ├── LICENSE │ ├── Math.php │ ├── ModularArithmetic.php │ ├── NistCurve.php │ ├── Point.php │ ├── PrivateKey.php │ ├── PublicKey.php │ ├── README.md │ └── composer.json └── pages ├── .htaccess ├── MAIL-forgot-a.php ├── MAIL-forgot-b.php ├── PAGE-404.php ├── PAGE-about.php ├── PAGE-check-list.php ├── PAGE-check-main.php ├── PAGE-check.php ├── PAGE-cus-form.php ├── PAGE-cus-list.php ├── PAGE-cus.php ├── PAGE-deliver-form.php ├── PAGE-deliver-list.php ├── PAGE-deliver.php ├── PAGE-forgot.php ├── PAGE-home.php ├── PAGE-import.php ├── PAGE-items-form.php ├── PAGE-items-list.php ├── PAGE-items-nfc.php ├── PAGE-items-sup-list.php ├── PAGE-items-sup.php ├── PAGE-items.php ├── PAGE-login.php ├── PAGE-move.php ├── PAGE-passwordless.php ├── PAGE-purchase-form.php ├── PAGE-purchase-list.php ├── PAGE-purchase.php ├── PAGE-push.php ├── PAGE-reports.php ├── PAGE-settings.php ├── PAGE-sup-form.php ├── PAGE-sup-items-form.php ├── PAGE-sup-items-list.php ├── PAGE-sup-items.php ├── PAGE-sup-list.php ├── PAGE-sup.php ├── PAGE-users-form.php ├── PAGE-users-list.php ├── PAGE-users-nfc.php ├── PAGE-users-qr.php ├── PAGE-users.php ├── REPORT-deliver.php ├── REPORT-loader.php ├── REPORT-purchase.php ├── REPORT-qr.php ├── TEMPLATE-bottom.php └── TEMPLATE-top.php /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [@code-box] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /CB-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Storage Boxx", 3 | "name": "Storage Boxx", 4 | "icons": [{ 5 | "src": "assets/favicon.png", 6 | "sizes": "64x64", 7 | "type": "image/png" 8 | }, { 9 | "src": "assets/ico-512.png", 10 | "sizes": "512x512", 11 | "type": "image/png" 12 | }], 13 | "start_url": "/", 14 | "scope": "/", 15 | "background_color": "white", 16 | "theme_color": "white", 17 | "display": "standalone" 18 | } -------------------------------------------------------------------------------- /CB-worker.js: -------------------------------------------------------------------------------- 1 | // (A) LOAD FROM CACHE FIRST, FALLBACK TO NETWORK IF NOT FOUND 2 | self.addEventListener("fetch", e => e.respondWith( 3 | caches.match(e.request).then(r => r || fetch(e.request)) 4 | )); 5 | 6 | // (B) LISTEN TO PUSH NOTIFICATIONS 7 | self.addEventListener("push", e => { 8 | const data = e.data.json(); 9 | self.registration.showNotification(data.title, { 10 | body: data.body, 11 | icon: data.icon, 12 | image: data.image 13 | }); 14 | }); -------------------------------------------------------------------------------- /TODO.txt: -------------------------------------------------------------------------------- 1 | STORAGE BOXX TO DO / WISH LIST 2 | ============================== 3 | 4 | * Check Item page update, add more info. 5 | * Suppliers > Purchase 6 | * Projected In/Out 7 | * Items list update. 8 | * Remove "suppliers" from dropdown options 9 | * Rename "movement" to "check" (replace suppliers with check) 10 | * Links 11 | * Suppliers > PO 12 | * Customers > DO 13 | * Auto-create PO for all items low on stock. 14 | * Home page widgets. 15 | * Directly email PO/DO. 16 | * More reports - delivery, purchases, charts, projections. 17 | * Print QR/NFC after import items. 18 | * Mass print QR code for items. 19 | * Customer "address book"? Different branches/departments - For DO. 20 | * Partial delivery/receive? -------------------------------------------------------------------------------- /assets/.htaccess: -------------------------------------------------------------------------------- 1 | Options -Indexes -------------------------------------------------------------------------------- /assets/PAGE-cbwork.js: -------------------------------------------------------------------------------- 1 | if ("serviceWorker" in navigator) { 2 | // (A) REGISTER SERVICE WORKER 3 | navigator.serviceWorker.register(cbhost.base+"CB-worker.js", {scope: cbhost.basepath}); 4 | 5 | // (B) UPDATE CACHE 6 | if (cbcache.s > cbcache.c) { 7 | // (B1) GET FILES LIST FROM SERVER 8 | fetch(cbhost.base+"CB-cache-files.json") 9 | .then(r => r.json()) 10 | .then(async f => { 11 | // (B2) DELETE OLD CACHE 12 | if (await caches.has(cbcache.n)) { 13 | await caches.delete(cbcache.n); 14 | } 15 | 16 | // (B3) UPDATE CACHE 17 | (await caches.open(cbcache.n)).addAll(f); 18 | localStorage.setItem("CBCACHE", cbcache.s); 19 | }); 20 | } 21 | } -------------------------------------------------------------------------------- /assets/PAGE-forgot.js: -------------------------------------------------------------------------------- 1 | function forgot () { 2 | cb.api({ 3 | mod : "session", act : "forgotA", 4 | data : { email : document.getElementById("forgot-email").value }, 5 | passmsg : false, 6 | onpass : () => cb.modal("Reset Link Sent", "Click on the reset link in your email.") 7 | }); 8 | return false; 9 | } -------------------------------------------------------------------------------- /assets/PAGE-items-check.js: -------------------------------------------------------------------------------- 1 | var check = { 2 | // (A) LOAD MOVEMENT HISTORY "MAIN PAGE" 3 | sku : null, // current sku 4 | pg : 1, // current page 5 | go : sku => { 6 | // (A1) SET FLAGS 7 | check.sku = sku; 8 | check.pg = 1; 9 | 10 | // (A2) AJAX LOAD "MAIN PAGE" 11 | cb.load({ 12 | page : "check-main", target : "cb-page-2", 13 | data : { sku : check.sku }, 14 | onload : () => { 15 | cb.page(2); 16 | check.list(); 17 | } 18 | }); 19 | }, 20 | 21 | // (B) SHOW ITEM MOVEMENT HISTORY 22 | list : () => cb.load({ 23 | page : "check/list", target : "check-list", 24 | data : { 25 | sku : check.sku, 26 | page : check.pg 27 | } 28 | }), 29 | 30 | // (C) GO TO PAGE 31 | // pg : int, page number 32 | goToPage : pg => { if (pg!=check.pg) { 33 | check.pg = pg; 34 | check.list(); 35 | }} 36 | }; -------------------------------------------------------------------------------- /assets/PAGE-login.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --bs-light-rgb: 150,150,150; 3 | } 4 | #cb-body { 5 | align-items: center; 6 | } 7 | #login-r { 8 | background-size: contain !important; 9 | min-height: 380px; 10 | } -------------------------------------------------------------------------------- /assets/PAGE-push.js: -------------------------------------------------------------------------------- 1 | function send () { 2 | cb.api({ 3 | mod : "push", act : "send", 4 | data : { 5 | title : document.getElementById("push_title").value, 6 | body : document.getElementById("push_txt").value, 7 | icon : document.getElementById("push_ico").value, 8 | image : document.getElementById("push_img").value 9 | }, 10 | passmsg : "Message sent", 11 | onpass : () => document.getElementById("push_form").reset() 12 | }); 13 | return false; 14 | } -------------------------------------------------------------------------------- /assets/PAGE-scanner.css: -------------------------------------------------------------------------------- 1 | .scannerA { 2 | position: fixed; top: 0; left: 0; 3 | width:100vw; height: 100vh; z-index: 999; 4 | } 5 | .scannerB { 6 | max-width: 600px; padding: 30px; 7 | margin: 0 auto; 8 | } 9 | #nfc-wrapC { 10 | padding: 60px 0; line-height: 2em; 11 | text-align: center; color: #fff; 12 | } 13 | #nfc-wrapC i { font-size: 100px; } -------------------------------------------------------------------------------- /assets/PAGE-settings.js: -------------------------------------------------------------------------------- 1 | function save () { 2 | // (A) GET ALL DATA 3 | let data = {}; 4 | for (let i of document.querySelectorAll("#set-list .form-control")) { 5 | data[i.name] = i.value; 6 | } 7 | 8 | // (B) API CALL 9 | cb.api({ 10 | mod : "settings", act : "save", 11 | data : { settings : JSON.stringify(data) }, 12 | passmsg : "Settings Saved" 13 | }); 14 | return false; 15 | } -------------------------------------------------------------------------------- /assets/PAGE-wa-helper.js: -------------------------------------------------------------------------------- 1 | var helper = { 2 | // (A) ARRAY BUFFER TO BASE 64 3 | atb : b => { 4 | let u = new Uint8Array(b), s = ""; 5 | for (let i=0; i { 11 | let pre = "=?BINARY?B?", suf = "?="; 12 | for (let k in o) { if (typeof o[k] == "string") { 13 | let s = o[k]; 14 | if (s.substring(0, pre.length)==pre && s.substring(s.length - suf.length)==suf) { 15 | let b = window.atob(s.substring(pre.length, s.length - suf.length)), 16 | u = new Uint8Array(b.length); 17 | for (let i=0; iucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "sup" => ["Autocomplete", "sup"], 8 | "supitem" => ["Autocomplete", "supitem"], 9 | "cus" => ["Autocomplete", "cus"], 10 | "user" => ["Autocomplete", "user"], 11 | "item" => ["Autocomplete", "item"], 12 | "sku" => ["Autocomplete", "sku"], 13 | "deliver" => ["Autocomplete", "deliver"], 14 | "purchase" => ["Autocomplete", "purchase"] 15 | ]); 16 | 17 | // (C) INVALID REQUEST 18 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-customers.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "save" => ["Customers", "save"], 8 | "del" => ["Customers", "del"], 9 | "import" => ["Customers", "import"] 10 | ]); 11 | 12 | // (C) INVALID REQUEST 13 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-delivery.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "save" => ["Delivery", "save"] 8 | ]); 9 | 10 | // (C) INVALID REQUEST 11 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-items.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "get" => ["Items", "get"], 8 | "save" => ["Items", "save"], 9 | "del" => ["Items", "del"], 10 | "import" => ["Items", "import"], 11 | "check" => ["Items", "check"] 12 | ]); 13 | 14 | // (C) INVALID REQUEST 15 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-move.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "saveM" => ["Move", "saveMC"] 8 | ]); 9 | 10 | // (C) INVALID REQUEST 11 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-purchase.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "save" => ["Purchase", "save"] 8 | ]); 9 | 10 | // (C) INVALID REQUEST 11 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-push.php: -------------------------------------------------------------------------------- 1 | autoAPI([ 4 | "save" => ["Push", "save"], 5 | "del" => ["Push", "del", "A"], 6 | "send" => ["Push", "send", "A"] 7 | ]); 8 | 9 | // (B) INVALID REQUEST 10 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-session.php: -------------------------------------------------------------------------------- 1 | autoAPI([ 4 | // (A1) REGULAR LOGIN 5 | "login" => ["Users", "login"], 6 | "logout" => ["Users", "logout"], 7 | // (A2) FORGOT PASSWORD 8 | "forgotA" => ["Forgot", "request"], 9 | "forgotB" => ["Forgot", "reset"], 10 | // (A3) WEB AUTHN LOGIN 11 | "waregA" => ["WAIN", "regA", true], 12 | "waregB" => ["WAIN", "regB", true], 13 | "waunreg" => ["WAIN", "unreg", true], 14 | "waloginA" => ["WAIN", "loginA"], 15 | "waloginB" => ["WAIN", "loginB"], 16 | // (A4) NFC LOGIN 17 | "nfcadd" => ["NFCIN", "add", "A"], 18 | "nfcdel" => ["NFCIN", "del", "A"], 19 | "nfclogin" => ["NFCIN", "login"], 20 | // (A5) QR LOGIN 21 | "qradd" => ["QRIN", "add", "A"], 22 | "qrdel" => ["QRIN", "del", "A"], 23 | "qrlogin" => ["QRIN", "login"] 24 | ]); 25 | 26 | // (B) INVALID REQUEST 27 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-settings.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "save" => ["Settings", "save"] 8 | ]); 9 | 10 | // (C) INVALID REQUEST 11 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-suppliers.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "save" => ["Suppliers", "save"], 8 | "del" => ["Suppliers", "del"], 9 | "import" => ["Suppliers", "import"], 10 | "getItem" => ["Suppliers", "getItem"], 11 | "saveItem" => ["Suppliers", "saveItem"], 12 | "delItem" => ["Suppliers", "delItem"], 13 | "importItem" => ["Suppliers", "importItem"] 14 | ]); 15 | 16 | // (C) INVALID REQUEST 17 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/API-users.php: -------------------------------------------------------------------------------- 1 | ucheck("A"); 4 | 5 | // (B) API ENDPOINTS 6 | $_CORE->autoAPI([ 7 | "get" => ["Users", "get"], 8 | "getAll" => ["Users", "getAll"], 9 | "save" => ["Users", "save"], 10 | "del" => ["Users", "del"], 11 | "import" => ["Users", "import"] 12 | ]); 13 | 14 | // (C) INVALID REQUEST 15 | $_CORE->respond(0, "Invalid request", null, null, 400); -------------------------------------------------------------------------------- /lib/CORE-Go.php: -------------------------------------------------------------------------------- 1 | load("DB"); 6 | $_CORE->load("Settings"); 7 | $_CORE->load("Session"); 8 | 9 | // (B) LOAD MODULES AS REQUIRED -------------------------------------------------------------------------------- /lib/CORE-Install.php: -------------------------------------------------------------------------------- 1 | load("Install"); 12 | $_PHASE = isset($_POST["phase"]) ? $_POST["phase"] : "B"; 13 | while ($_PHASE != null) { $_PHASE = $_CORE->Install->$_PHASE(); } -------------------------------------------------------------------------------- /lib/HOOK-API-CORS.php: -------------------------------------------------------------------------------- 1 | ROUTES->API() 3 | // USE THIS TO OVERRIDE API CORS PERMISSION 4 | // $this->origin : client origin, e.g. http://site.com 5 | // $this->orihost : client origin host, e.g. site.com 6 | // $this->mod : requested module. e.g. users 7 | // $this->act : requested action. e.g. save 8 | 9 | /* 10 | // (A) EXAMPLE - ALLOW "FOO.COM" TO ACCESS "TEST" MODULE 11 | if ($this->orihost=="foo.com" && $this->mod=="test") { 12 | $access = true; 13 | } 14 | 15 | // (B) EXAMPLE - ALLOW "BAR.COM" TO ACCESS SOME ACTIONS IN "TEST" MODULE 16 | $allowed = ["get", "getAll"]; 17 | if ($this->orihost=="bar.com" && $this->mod=="test" && in_array($this->act, $allowed)) { 18 | $access = true; 19 | } 20 | */ -------------------------------------------------------------------------------- /lib/HOOK-Routes.php: -------------------------------------------------------------------------------- 1 | ROUTES->RESOLVE() 3 | // USE THIS TO OVERRIDE URL PAGE ROUTES 4 | 5 | // (A) EXACT PATH ROUTING 6 | $routes = [ 7 | // EXAMPLES 8 | // "/" => "myhome.php", // http://site.com/ > pages/myhome.php 9 | // "foo/" => "bar.php", // http://site.com/foo/ > pages/bar.php 10 | ]; 11 | 12 | // (B) WILDCARD PATH ROUTING 13 | $wild = [ 14 | "report/" => "REPORT-loader.php" 15 | // EXAMPLE 16 | // "category/" => "category.php", // http://site.com/category/* > pages/category.php 17 | ]; 18 | 19 | // (C) REDIRECT TO LOGIN PAGE IF NOT SIGNED IN 20 | $override = function ($path) { 21 | global $_CORE; 22 | if (!isset($_SESSION["user"]) && $path!="login/" && $path!="forgot/") { 23 | if (isset($_POST["ajax"])) { exit("E"); } 24 | else { $_CORE->redirect("login/"); } 25 | } 26 | return $path; 27 | }; -------------------------------------------------------------------------------- /lib/HOOK-SESS-Load.php: -------------------------------------------------------------------------------- 1 | SESSION->__CONSTRUCT() 3 | // USE THIS TO BUILD/OVERRIDE SESSION DATA WHEN UNPACKING THE JWT 4 | 5 | // LOAD USER INFO INTO SESSION 6 | if (isset($_SESSION["user"])) { 7 | $user = $this->DB->fetch( 8 | "SELECT * FROM `users` WHERE `user_id`=?", [$_SESSION["user"]["user_id"]] 9 | ); 10 | if (!is_array($user) || (isset($user["user_level"]) && $user["user_level"]=="S")) { 11 | $this->destroy(); 12 | throw new Exception("Invalid or expired session."); 13 | } else { 14 | unset($user["user_password"]); 15 | $_SESSION["user"] = $user; 16 | } 17 | } -------------------------------------------------------------------------------- /lib/HOOK-SESS-Save.php: -------------------------------------------------------------------------------- 1 | SESSION->SAVE() 3 | // USE THIS TO OVERRIDE DATA TO BE SAVED INTO THE JWT 4 | 5 | // ONLY SAVE USER ID INTO JWT 6 | if (isset($data["user"])) { 7 | $data["user"] = ["user_id" => $data["user"]["user_id"]]; 8 | } -------------------------------------------------------------------------------- /lib/JWT/autoload.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /lib/JWT/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/firebase/php-jwt/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /lib/JWT/composer/platform_check.php: -------------------------------------------------------------------------------- 1 | = 70400)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /lib/JWT/firebase/php-jwt/src/BeforeValidException.php: -------------------------------------------------------------------------------- 1 | payload = $payload; 12 | } 13 | 14 | public function getPayload(): object 15 | { 16 | return $this->payload; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/JWT/firebase/php-jwt/src/ExpiredException.php: -------------------------------------------------------------------------------- 1 | payload = $payload; 12 | } 13 | 14 | public function getPayload(): object 15 | { 16 | return $this->payload; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/JWT/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php: -------------------------------------------------------------------------------- 1 | Core->load("DB"); 20 | $this->DB->update("settings", ["setting_value"], "`setting_name`=?", [strtotime("now"), "CACHE_VER"]); 21 | } 22 | } -------------------------------------------------------------------------------- /lib/WebAuthn/autoload.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /lib/WebAuthn/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/lbuchs/webauthn/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /lib/WebAuthn/composer/platform_check.php: -------------------------------------------------------------------------------- 1 | = 80000)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /lib/WebAuthn/lbuchs/webauthn/.gitignore: -------------------------------------------------------------------------------- 1 | # Netbeans project 2 | nbproject/ 3 | /index.php 4 | 5 | 6 | # .pem files from FIDO Alliance Metadata Service (MDS) 7 | _test/rootCertificates/mds/*.pem 8 | _test/rootCertificates/mds/lastMdsFetch.txt 9 | -------------------------------------------------------------------------------- /lib/WebAuthn/lbuchs/webauthn/_test/rootCertificates/mds/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/WebAuthn/lbuchs/webauthn/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lbuchs/webauthn", 3 | "description": "A simple PHP WebAuthn (FIDO2) server library", 4 | "keywords": [ 5 | "webauthn", "authentication" 6 | ], 7 | "homepage": "https://github.com/lbuchs/webauthn", 8 | "license": "MIT", 9 | "authors": [ 10 | { 11 | "name": "Lukas Buchs", 12 | "role": "Developer" 13 | } 14 | ], 15 | "require": { 16 | "php" : ">=8.0.0" 17 | }, 18 | "autoload": { 19 | "psr-4": { 20 | "lbuchs\\WebAuthn\\": "src" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/WebAuthn/lbuchs/webauthn/src/Attestation/Format/None.php: -------------------------------------------------------------------------------- 1 | 126) { 22 | $char = \strtoupper(\dechex($ord)); 23 | 24 | if ($ord < 10) { 25 | $char = '0' . $char; 26 | } 27 | } else { 28 | $char = '"' . $char . '"'; 29 | } 30 | 31 | return new self(sprintf('Char %s is not a valid character in the given alphabet.', $char)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/webpush/brick/math/src/Exception/RoundingNecessaryException.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /lib/webpush/composer/autoload_files.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 10 | '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', 11 | '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', 12 | ); 13 | -------------------------------------------------------------------------------- /lib/webpush/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | = 80100)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /lib/webpush/guzzlehttp/guzzle/src/BodySummarizer.php: -------------------------------------------------------------------------------- 1 | truncateAt = $truncateAt; 17 | } 18 | 19 | /** 20 | * Returns a summarized message body. 21 | */ 22 | public function summarize(MessageInterface $message): ?string 23 | { 24 | return $this->truncateAt === null 25 | ? \GuzzleHttp\Psr7\Message::bodySummary($message) 26 | : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/webpush/guzzlehttp/guzzle/src/BodySummarizerInterface.php: -------------------------------------------------------------------------------- 1 | getState() === PromiseInterface::PENDING; 15 | } 16 | 17 | /** 18 | * Returns true if a promise is fulfilled or rejected. 19 | */ 20 | public static function settled(PromiseInterface $promise): bool 21 | { 22 | return $promise->getState() !== PromiseInterface::PENDING; 23 | } 24 | 25 | /** 26 | * Returns true if a promise is fulfilled. 27 | */ 28 | public static function fulfilled(PromiseInterface $promise): bool 29 | { 30 | return $promise->getState() === PromiseInterface::FULFILLED; 31 | } 32 | 33 | /** 34 | * Returns true if a promise is rejected. 35 | */ 36 | public static function rejected(PromiseInterface $promise): bool 37 | { 38 | return $promise->getState() === PromiseInterface::REJECTED; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/webpush/guzzlehttp/promises/src/PromisorInterface.php: -------------------------------------------------------------------------------- 1 | @,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; 22 | public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; 23 | } 24 | -------------------------------------------------------------------------------- /lib/webpush/minishlink/web-push/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Louis Lagrange 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /lib/webpush/minishlink/web-push/phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 7 3 | paths: 4 | - src 5 | checkMissingIterableValueType: false 6 | reportUnmatchedIgnoredErrors: false 7 | ignoreErrors: 8 | - '#Unreachable statement \- code above always terminates\.#' 9 | -------------------------------------------------------------------------------- /lib/webpush/minishlink/web-push/src/SubscriptionInterface.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * For the full copyright and license information, please view the LICENSE 11 | * file that was distributed with this source code. 12 | */ 13 | 14 | namespace Minishlink\WebPush; 15 | 16 | /** 17 | * @author Sergii Bondarenko 18 | */ 19 | interface SubscriptionInterface 20 | { 21 | public function getEndpoint(): string; 22 | 23 | public function getPublicKey(): ?string; 24 | 25 | public function getAuthToken(): ?string; 26 | 27 | public function getContentEncoding(): ?string; 28 | } 29 | -------------------------------------------------------------------------------- /lib/webpush/psr/http-client/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file, in reverse chronological order by release. 4 | 5 | ## 1.0.3 6 | 7 | Add `source` link in composer.json. No code changes. 8 | 9 | ## 1.0.2 10 | 11 | Allow PSR-7 (psr/http-message) 2.0. No code changes. 12 | 13 | ## 1.0.1 14 | 15 | Allow installation with PHP 8. No code changes. 16 | 17 | ## 1.0.0 18 | 19 | First stable release. No changes since 0.3.0. 20 | 21 | ## 0.3.0 22 | 23 | Added Interface suffix on exceptions 24 | 25 | ## 0.2.0 26 | 27 | All exceptions are in `Psr\Http\Client` namespace 28 | 29 | ## 0.1.0 30 | 31 | First release 32 | -------------------------------------------------------------------------------- /lib/webpush/psr/http-client/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 PHP Framework Interoperability Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /lib/webpush/psr/http-client/README.md: -------------------------------------------------------------------------------- 1 | HTTP Client 2 | =========== 3 | 4 | This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url]. 5 | 6 | Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client. 7 | 8 | The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. 9 | 10 | [psr-url]: https://www.php-fig.org/psr/psr-18 11 | [package-url]: https://packagist.org/packages/psr/http-client 12 | [implementation-url]: https://packagist.org/providers/psr/http-client-implementation 13 | -------------------------------------------------------------------------------- /lib/webpush/psr/http-client/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "psr/http-client", 3 | "description": "Common interface for HTTP clients", 4 | "keywords": ["psr", "psr-18", "http", "http-client"], 5 | "homepage": "https://github.com/php-fig/http-client", 6 | "license": "MIT", 7 | "authors": [ 8 | { 9 | "name": "PHP-FIG", 10 | "homepage": "https://www.php-fig.org/" 11 | } 12 | ], 13 | "support": { 14 | "source": "https://github.com/php-fig/http-client" 15 | }, 16 | "require": { 17 | "php": "^7.0 || ^8.0", 18 | "psr/http-message": "^1.0 || ^2.0" 19 | }, 20 | "autoload": { 21 | "psr-4": { 22 | "Psr\\Http\\Client\\": "src/" 23 | } 24 | }, 25 | "extra": { 26 | "branch-alias": { 27 | "dev-master": "1.0.x-dev" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/webpush/psr/http-client/src/ClientExceptionInterface.php: -------------------------------------------------------------------------------- 1 | =7.0.0", 23 | "psr/http-message": "^1.0 || ^2.0" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "Psr\\Http\\Message\\": "src/" 28 | } 29 | }, 30 | "extra": { 31 | "branch-alias": { 32 | "dev-master": "1.0.x-dev" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/webpush/psr/http-factory/src/RequestFactoryInterface.php: -------------------------------------------------------------------------------- 1 | =5.6" 13 | }, 14 | "require-dev": { 15 | "phpunit/phpunit": "^5 || ^6.5", 16 | "php-coveralls/php-coveralls": "^2.1" 17 | }, 18 | "autoload": { 19 | "files": ["src/getallheaders.php"] 20 | }, 21 | "autoload-dev": { 22 | "psr-4": { 23 | "getallheaders\\Tests\\": "tests/" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/base64url/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Spomky 2 | patreon: FlorentMorselli 3 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/base64url/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2018 Spomky-Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/base64url/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spomky-labs/base64url", 3 | "description": "Base 64 URL Safe Encoding/Decoding PHP Library", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["Base64", "URL", "Safe", "RFC4648"], 7 | "homepage": "https://github.com/Spomky-Labs/base64url", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky-Labs/base64url/contributors" 12 | } 13 | ], 14 | "autoload": { 15 | "psr-4": { 16 | "Base64Url\\": "src/" 17 | } 18 | }, 19 | "autoload-dev": { 20 | "psr-4": { 21 | "Base64Url\\Test\\": "tests/" 22 | } 23 | }, 24 | "require": { 25 | "php": ">=7.1" 26 | }, 27 | "require-dev": { 28 | "phpstan/extension-installer": "^1.0", 29 | "phpstan/phpstan": "^0.11|^0.12", 30 | "phpstan/phpstan-beberlei-assert": "^0.11|^0.12", 31 | "phpstan/phpstan-deprecation-rules": "^0.11|^0.12", 32 | "phpstan/phpstan-phpunit": "^0.11|^0.12", 33 | "phpstan/phpstan-strict-rules": "^0.11|^0.12" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/README.md: -------------------------------------------------------------------------------- 1 | # Public Key Infrastructure 2 | 3 | > **Note** 4 | > The code in this framework is the same as the one available in https://github.com/sop, 5 | > but modified to fulfil with the Spomky-Labs requirements. 6 | > All credits go to the original developer 7 | 8 | A PHP Framework 9 | 10 | * X.509 public key certificates, attribute certificates, 11 | * X.690 Abstract Syntax Notation One (ASN.1) Distinguished Encoding Rules (DER) encoding and decoding 12 | * X.501 ASN.1 types, X.520 attributes and DN parsing. 13 | * [RFC 7468](https://tools.ietf.org/html/rfc7468) textual encodings of cryptographic structures _(PEM)_. 14 | * Various ASN.1 types for cryptographic applications. 15 | * Cryptography support for various PKCS applications. 16 | 17 | ## Requirements 18 | 19 | - PHP >=8.1 20 | - `mbstring` 21 | 22 | The extension `gmp` or `bcmath` is highly recommended 23 | 24 | ## Installation 25 | 26 | This library is available on [Github](https://github.com/Spomky-Labs/pki-framework). 27 | 28 | ```sh 29 | composer require spomky-labs/pki-framework 30 | ``` 31 | 32 | ## License 33 | 34 | This project is licensed under the MIT License. 35 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | |---------| ------------------ | 7 | | 1.0.x | :white_check_mark: | 8 | | < 1.0.0 | :x: | 9 | 10 | ## Reporting a Vulnerability 11 | 12 | If you think you have found a security issue, DO NOT open an issue. You MUST email your issue: security AT 13 | spomky-labs.com. 14 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/ASN1/Exception/DecodeException.php: -------------------------------------------------------------------------------- 1 | intLength(); 27 | $bytes = mb_substr($data, $idx, $length, '8bit'); 28 | $idx += $length; 29 | $num = BigInt::fromSignedOctets($bytes)->getValue(); 30 | $offset = $idx; 31 | // late static binding since enumerated extends integer type 32 | return self::create($num); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/ASN1/Type/Primitive/GeneralString.php: -------------------------------------------------------------------------------- 1 | string(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/ASN1/Type/Primitive/OctetString.php: -------------------------------------------------------------------------------- 1 | class; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/ASN1/Type/TimeType.php: -------------------------------------------------------------------------------- 1 | params; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/CryptoTypes/AlgorithmIdentifier/Signature/RSASignatureAlgorithmIdentifier.php: -------------------------------------------------------------------------------- 1 | oid() === self::OID_RSA_ENCRYPTION; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/CryptoTypes/AlgorithmIdentifier/SpecificAlgorithmIdentifier.php: -------------------------------------------------------------------------------- 1 | $value->toAttribute(), $values)); 23 | } 24 | 25 | // Nothing yet. Extended from base class for future extensions. 26 | } 27 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/CryptoTypes/Asymmetric/PrivateKeyInfo.php: -------------------------------------------------------------------------------- 1 | publicKey); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/CryptoTypes/Signature/Ed25519Signature.php: -------------------------------------------------------------------------------- 1 | signature = $signature; 31 | } 32 | 33 | public static function create(string $signature): self 34 | { 35 | return new self($signature); 36 | } 37 | 38 | public function bitString(): BitString 39 | { 40 | return BitString::create($this->signature); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/CryptoTypes/Signature/Ed448Signature.php: -------------------------------------------------------------------------------- 1 | signature = $signature; 31 | } 32 | 33 | public static function create(string $signature): self 34 | { 35 | return new self($signature); 36 | } 37 | 38 | public function bitString(): BitString 39 | { 40 | return BitString::create($this->signature); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/X501/ASN1/AttributeValue/CommonNameValue.php: -------------------------------------------------------------------------------- 1 | asPrintableString()->string()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/X501/ASN1/AttributeValue/DescriptionValue.php: -------------------------------------------------------------------------------- 1 | asPrintableString()->string()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/X501/ASN1/AttributeValue/StateOrProvinceNameValue.php: -------------------------------------------------------------------------------- 1 | withCaseFolding(true) 23 | ); 24 | } 25 | 26 | public static function create(int $stringType): self 27 | { 28 | return new self($stringType); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/X501/MatchingRule/MatchingRule.php: -------------------------------------------------------------------------------- 1 | preparer->prepare($assertion); 22 | $value = $this->preparer->prepare($value); 23 | return strcmp($assertion, $value) === 0; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/X501/StringPrep/CheckBidiStep.php: -------------------------------------------------------------------------------- 1 | fold) { 36 | $string = mb_convert_case($string, MB_CASE_LOWER, 'UTF-8'); 37 | } 38 | return $string; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/X501/StringPrep/NormalizeStep.php: -------------------------------------------------------------------------------- 1 | rdn; 32 | } 33 | 34 | protected function _valueASN1(): Element 35 | { 36 | return $this->rdn->toASN1(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/webpush/spomky-labs/pki-framework/src/X509/Certificate/Extension/FreshestCRLExtension.php: -------------------------------------------------------------------------------- 1 | =8.1" 19 | }, 20 | "autoload": { 21 | "files": [ 22 | "function.php" 23 | ] 24 | }, 25 | "minimum-stability": "dev", 26 | "extra": { 27 | "branch-alias": { 28 | "dev-main": "3.4-dev" 29 | }, 30 | "thanks": { 31 | "name": "symfony/contracts", 32 | "url": "https://github.com/symfony/contracts" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/webpush/symfony/deprecation-contracts/function.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | if (!function_exists('trigger_deprecation')) { 13 | /** 14 | * Triggers a silenced deprecation notice. 15 | * 16 | * @param string $package The name of the Composer package that is triggering the deprecation 17 | * @param string $version The version of the package that introduced the deprecation 18 | * @param string $message The message of the deprecation 19 | * @param mixed ...$args Values to insert in the message using printf() formatting 20 | * 21 | * @author Nicolas Grekas 22 | */ 23 | function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void 24 | { 25 | @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-core/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is 4 | READ ONLY. 5 | Please do not submit any Pull Requests here. It will be automatically closed. 6 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-core/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-core/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-core/Algorithm.php: -------------------------------------------------------------------------------- 1 | getCode(), $throwable); 21 | } 22 | } 23 | 24 | public static function decode(string $payload): mixed 25 | { 26 | return json_decode($payload, true, 512, JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is 4 | READ ONLY. 5 | Please do not submit any Pull Requests here. It will be automatically closed. 6 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/AlgorithmAnalyzer.php: -------------------------------------------------------------------------------- 1 | has('alg')) { 14 | $bag->add(Message::medium('The parameter "alg" should be added.')); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/ES256KeyAnalyzer.php: -------------------------------------------------------------------------------- 1 | analyzers[] = $analyzer; 22 | } 23 | 24 | /** 25 | * This method will analyze the JWK object using all analyzers. It returns a message bag that may contains messages. 26 | */ 27 | public function analyze(JWK $jwk): MessageBag 28 | { 29 | $bag = new MessageBag(); 30 | foreach ($this->analyzers as $analyzer) { 31 | $analyzer->analyze($jwk, $bag); 32 | } 33 | 34 | return $bag; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/KeyIdentifierAnalyzer.php: -------------------------------------------------------------------------------- 1 | has('kid')) { 14 | $bag->add(Message::medium('The parameter "kid" should be added.')); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/KeysetAnalyzer.php: -------------------------------------------------------------------------------- 1 | analyzers[] = $analyzer; 22 | } 23 | 24 | /** 25 | * This method will analyze the JWKSet object using all analyzers. It returns a message bag that may contains 26 | * messages. 27 | */ 28 | public function analyze(JWKSet $jwkset): MessageBag 29 | { 30 | $bag = new MessageBag(); 31 | foreach ($this->analyzers as $analyzer) { 32 | $analyzer->analyze($jwkset, $bag); 33 | } 34 | 35 | return $bag; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/MixedKeyTypes.php: -------------------------------------------------------------------------------- 1 | count() === 0) { 14 | return; 15 | } 16 | 17 | $hasSymmetricKeys = false; 18 | $hasAsymmetricKeys = false; 19 | 20 | foreach ($jwkset as $jwk) { 21 | switch ($jwk->get('kty')) { 22 | case 'oct': 23 | $hasSymmetricKeys = true; 24 | 25 | break; 26 | 27 | case 'OKP': 28 | case 'RSA': 29 | case 'EC': 30 | $hasAsymmetricKeys = true; 31 | 32 | break; 33 | } 34 | } 35 | 36 | if ($hasAsymmetricKeys && $hasSymmetricKeys) { 37 | $bag->add(Message::medium('This key set mixes symmetric and assymetric keys.')); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/MixedPublicAndPrivateKeys.php: -------------------------------------------------------------------------------- 1 | count() === 0) { 14 | return; 15 | } 16 | 17 | $hasPublicKeys = false; 18 | $hasPrivateKeys = false; 19 | 20 | foreach ($jwkset as $jwk) { 21 | switch ($jwk->get('kty')) { 22 | case 'OKP': 23 | case 'RSA': 24 | case 'EC': 25 | if ($jwk->has('d')) { 26 | $hasPrivateKeys = true; 27 | } else { 28 | $hasPublicKeys = true; 29 | } 30 | 31 | break; 32 | } 33 | } 34 | 35 | if ($hasPrivateKeys && $hasPublicKeys) { 36 | $bag->add(Message::high('This key set mixes public and private keys.')); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/NoneAnalyzer.php: -------------------------------------------------------------------------------- 1 | get('kty') !== 'none') { 14 | return; 15 | } 16 | 17 | $bag->add( 18 | Message::high( 19 | 'This key is a meant to be used with the algorithm "none". This algorithm is not secured and should be used with care.' 20 | ) 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/Analyzer/OctAnalyzer.php: -------------------------------------------------------------------------------- 1 | get('kty') !== 'oct') { 16 | return; 17 | } 18 | $k = $jwk->get('k'); 19 | if (! is_string($k)) { 20 | $bag->add(Message::high('The key is not valid')); 21 | 22 | return; 23 | } 24 | $k = Base64UrlSafe::decodeNoPadding($k); 25 | $kLength = 8 * mb_strlen($k, '8bit'); 26 | if ($kLength < 128) { 27 | $bag->add(Message::high('The key length is less than 128 bits.')); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/JKUFactory.php: -------------------------------------------------------------------------------- 1 | getContent($url, $header); 20 | $data = JsonConverter::decode($content); 21 | if (! is_array($data)) { 22 | throw new RuntimeException('Invalid content.'); 23 | } 24 | 25 | return JWKSet::createFromKeyData($data); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2019 Spomky-Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/README.md: -------------------------------------------------------------------------------- 1 | PHP JWT Key Management Component 2 | ================================ 3 | 4 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is 5 | READ ONLY. 6 | 7 | **Please do not submit any Pull Request here.** 8 | You should go to [the main repository](https://github.com/web-token/jwt-framework) instead. 9 | 10 | # Documentation 11 | 12 | The official documentation is available as https://web-token.spomky-labs.com/ 13 | 14 | # Licence 15 | 16 | This software is release under [MIT licence](LICENSE). 17 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-key-mgmt/UrlKeySetFactory.php: -------------------------------------------------------------------------------- 1 | requestFactory->createRequest('GET', $url); 25 | foreach ($header as $k => $v) { 26 | $request = $request->withHeader($k, $v); 27 | } 28 | $response = $this->client->sendRequest($request); 29 | 30 | if ($response->getStatusCode() >= 400) { 31 | throw new RuntimeException('Unable to get the key set.', $response->getStatusCode()); 32 | } 33 | 34 | return $response->getBody() 35 | ->getContents(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature-algorithm-ecdsa/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is 4 | READ ONLY. 5 | Please do not submit any Pull Requests here. It will be automatically closed. 6 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature-algorithm-ecdsa/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature-algorithm-ecdsa/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature-algorithm-ecdsa/ES256.php: -------------------------------------------------------------------------------- 1 | signatureAlgorithmManagerFactory->create($algorithms); 24 | 25 | return new JWSBuilder($algorithmManager); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature/JWSTokenSupport.php: -------------------------------------------------------------------------------- 1 | $protectedHeader 20 | * @param array $unprotectedHeader 21 | */ 22 | public function retrieveTokenHeaders(JWT $jwt, int $index, array &$protectedHeader, array &$unprotectedHeader): void 23 | { 24 | if (! $jwt instanceof JWS) { 25 | return; 26 | } 27 | 28 | if ($index > $jwt->countSignatures()) { 29 | throw new InvalidArgumentException('Unknown signature index.'); 30 | } 31 | $protectedHeader = $jwt->getSignature($index) 32 | ->getProtectedHeader(); 33 | $unprotectedHeader = $jwt->getSignature($index) 34 | ->getHeader(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature/JWSVerifierFactory.php: -------------------------------------------------------------------------------- 1 | algorithmManagerFactory->create($algorithms); 24 | 25 | return new JWSVerifier($algorithmManager); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2019 Spomky-Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature/README.md: -------------------------------------------------------------------------------- 1 | PHP JWT Signature Component 2 | =========================== 3 | 4 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is 5 | READ ONLY. 6 | 7 | **Please do not submit any Pull Request here.** 8 | You should go to [the main repository](https://github.com/web-token/jwt-framework) instead. 9 | 10 | # Documentation 11 | 12 | The official documentation is available as https://web-token.spomky-labs.com/ 13 | 14 | # Licence 15 | 16 | This software is release under [MIT licence](LICENSE). 17 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-signature/Serializer/JWSSerializer.php: -------------------------------------------------------------------------------- 1 | $protectedHeader 13 | */ 14 | protected function isPayloadEncoded(array $protectedHeader): bool 15 | { 16 | return ! array_key_exists('b64', $protectedHeader) || $protectedHeader['b64'] === true; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-util-ecc/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is 4 | READ ONLY. 5 | Please do not submit any Pull Requests here. It will be automatically closed. 6 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-util-ecc/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-util-ecc/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-util-ecc/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2019 Spomky-Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-util-ecc/Math.php: -------------------------------------------------------------------------------- 1 | isEqualTo($other); 18 | } 19 | 20 | public static function add(BigInteger $augend, BigInteger $addend): BigInteger 21 | { 22 | return $augend->plus($addend); 23 | } 24 | 25 | public static function toString(BigInteger $value): string 26 | { 27 | return $value->toBase(10); 28 | } 29 | 30 | public static function inverseMod(BigInteger $a, BigInteger $m): BigInteger 31 | { 32 | return CoreBigInteger::createFromBigInteger($a)->modInverse(CoreBigInteger::createFromBigInteger($m))->get(); 33 | } 34 | 35 | public static function baseConvert(string $number, int $from, int $to): string 36 | { 37 | return BigInteger::fromBase($number, $from)->toBase($to); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-util-ecc/ModularArithmetic.php: -------------------------------------------------------------------------------- 1 | minus($subtrahend) 17 | ->mod($modulus); 18 | } 19 | 20 | public static function mul(BigInteger $multiplier, BigInteger $muliplicand, BigInteger $modulus): BigInteger 21 | { 22 | return $multiplier->multipliedBy($muliplicand) 23 | ->mod($modulus); 24 | } 25 | 26 | public static function div(BigInteger $dividend, BigInteger $divisor, BigInteger $modulus): BigInteger 27 | { 28 | return self::mul($dividend, Math::inverseMod($divisor, $modulus), $modulus); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/webpush/web-token/jwt-util-ecc/README.md: -------------------------------------------------------------------------------- 1 | ECC Tools For JWT-Framework 2 | ============================ 3 | 4 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is 5 | READ ONLY. 6 | 7 | **Please do not submit any Pull Request here.** 8 | You should go to [the main repository](https://github.com/web-token/jwt-framework) instead. 9 | 10 | # Documentation 11 | 12 | The official documentation is available as https://web-token.spomky-labs.com/ 13 | 14 | # Licence 15 | 16 | This software is release under [MIT licence](LICENSE). 17 | -------------------------------------------------------------------------------- /pages/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /pages/MAIL-forgot-a.php: -------------------------------------------------------------------------------- 1 | 2 | Click here to reset your password. 3 | -------------------------------------------------------------------------------- /pages/MAIL-forgot-b.php: -------------------------------------------------------------------------------- 1 | 2 | Your new password is 3 | -------------------------------------------------------------------------------- /pages/PAGE-404.php: -------------------------------------------------------------------------------- 1 | 2 |

NOT FOUND

3 |

It may have been abducted by aliens.

4 | -------------------------------------------------------------------------------- /pages/PAGE-check-list.php: -------------------------------------------------------------------------------- 1 | autoCall("Move", "getM"); 4 | $_CORE->Settings->defineN("STOCK_MVT", true); 5 | 6 | // (B) OUTPUT MOVEMENT HISTORY 7 | if (is_array($move)) { foreach ($move as $m) { ?> 8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | load("Page"); 23 | $_CORE->Page->draw("check.goToPage"); -------------------------------------------------------------------------------- /pages/PAGE-check-main.php: -------------------------------------------------------------------------------- 1 | autoCall("Items", "get"); ?> 4 | 5 | 14 | 15 | 16 |
-------------------------------------------------------------------------------- /pages/PAGE-items-nfc.php: -------------------------------------------------------------------------------- 1 |

WRITE NFC TAG

2 | 3 |
4 |
5 | "> 6 | 7 |
8 |
9 | 10 | 13 | -------------------------------------------------------------------------------- /pages/PAGE-items-sup-list.php: -------------------------------------------------------------------------------- 1 | autoCall("Suppliers", "getBySKU"); 4 | 5 | // (B) SUPPLIERS LIST 6 | if (is_array($sup)) { foreach ($sup as $id=>$s) { ?> 7 |
8 |
9 | []
10 | 11 | tel "> 12 | email "> 13 |
14 | price / 15 |
16 |
17 |
18 | load("Page"); 22 | $_CORE->Page->draw("inv.suppage"); -------------------------------------------------------------------------------- /pages/PAGE-items-sup.php: -------------------------------------------------------------------------------- 1 | autoCall("Items", "get"); 4 | ?> 5 | 6 |
7 |
8 |

SUPPLIERS LIST

9 | [] 10 |
11 | 12 |
13 | 14 | 15 |
-------------------------------------------------------------------------------- /pages/PAGE-settings.php: -------------------------------------------------------------------------------- 1 | Settings->getAll(); 4 | 5 | // (B) SETTINGS LIST 6 | $_PMETA = ["load" => [ 7 | ["s", HOST_ASSETS."PAGE-settings.js", "defer"] 8 | ]]; 9 | require PATH_PAGES . "TEMPLATE-top.php"; ?> 10 |

SYSTEM SETTINGS

11 |
12 | 13 |
14 | 15 | 16 | 17 | " value=""> 19 | 20 | 21 |
22 | 23 | 24 | 27 |
28 | -------------------------------------------------------------------------------- /pages/REPORT-loader.php: -------------------------------------------------------------------------------- 1 | Route->path); 3 | if (count($req)!=3) { exit("Invalid request"); } 4 | $_CORE->autoCall("Report", $req[1]); -------------------------------------------------------------------------------- /pages/REPORT-qr.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |
7 | 8 |
9 | 10 | -------------------------------------------------------------------------------- /pages/TEMPLATE-bottom.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------