# AuthWebApi **Repository Path**: BukkitPlugin/AuthWebApi ## Basic Information - **Project Name**: AuthWebApi - **Description**: No description available - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-11 - **Last Updated**: 2022-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AuthWebApi #### 介绍 在Spigot服务端中创建一个HttpServer实例,提供Authme密码验证服务。HttpClient需将密码进行AES加密,避免泄露 #### 请求示例(必须指定Content-Type) ``` POST http://ip-address:socket/auth Content-Type: application/json Body: {"name": "UserName","password": "AES Encrypted Password(Base64)"} ``` #### 密码加密示例(Java) ``` Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); SecretKey secretKey = new SecretKeySpec("Your AES Key".getBytes(StandardCharsets.UTF_8), "AES"); cipher.init(Cipher.ENCRYPT_MODE, secretKey); System.out.println(Base64.getEncoder().encodeToString(cipher.doFinal("Password".getBytes(StandardCharsets.UTF_8)))); ```