Nouvelles Regex : CLIENT_SIGN_UP validée

This commit is contained in:
Maximilien LEDOUX 2022-03-19 13:13:02 +01:00
parent 182fc39ebe
commit 713e930eb9
2 changed files with 21 additions and 2 deletions

View File

@ -3,15 +3,19 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.protocol.rules.writer.SignErrorRule;
import lightcontainer.protocol.rules.writer.SignOkRule;
import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SIGN_UP;
/**
* Règle permettant de gérer la création d'un utilisateur
*/
public class SignupRule extends ProtocolReader {
// Constants
private static final String PATTERN = "^SIGNUP ([A-Za-z0-9]{5,20}) ([^ !]{5,50})\r\n$";
//"^SIGNUP ([A-Za-z0-9]{5,20}) ([^ !]{5,50})\r\n$"
private static final String PATTERN = CLIENT_SIGN_UP;
private static final String NAME = "SIGNUP";
private static final int LOGIN = 0;
private static final int PASSWORD = 1;

View File

@ -1 +1,16 @@
{"unicast_port":8000,"multicast_ip":"224.66.66.1","multicast_port":15502,"network_interface":"lo","tls":true,"storagePath":"C:\\Users\\ledou\\Documents\\ffe","users":[{"name":"aaaaa","password":"$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km","aes_key":"a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=","files":[{"name":"test.txt","fileNameSalt":"RlrRzOXSrcetsVQjqOKB6g==","size":301,"iv":"NHrHwZRdshh5JQQA5Sw/UA==","storage":["lightcontainerSB01"]}]}]}
{
"unicast_port": 8000,
"multicast_ip": "224.66.66.1",
"multicast_port": 15502,
"network_interface": "lo",
"tls": true,
"storagePath": "C:\\Users\\ledou\\Documents\\ffe",
"users": [
{
"name": "aaaaa",
"password": "$2a$10$Up/pME2iFKALVSu8/JDpG.8Vc2vidOm99SeVoayCB1th7KHMZ1gq2",
"aes_key": "4+D3geivckhduP14646nYBb91N71HJj+8uvHFb0su0o=",
"files": []
}
]
}