From 03f3226ea055dca3565bb859437624ef04a236fd Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 9 Mar 2023 01:48:39 -0500 Subject: Omega cache, session, and account provider complete overhaul --- .../src/Validators/LoginMessageValidation.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'plugins/VNLib.Plugins.Essentials.SocialOauth/src/Validators') diff --git a/plugins/VNLib.Plugins.Essentials.SocialOauth/src/Validators/LoginMessageValidation.cs b/plugins/VNLib.Plugins.Essentials.SocialOauth/src/Validators/LoginMessageValidation.cs index 86893c5..3cf4e70 100644 --- a/plugins/VNLib.Plugins.Essentials.SocialOauth/src/Validators/LoginMessageValidation.cs +++ b/plugins/VNLib.Plugins.Essentials.SocialOauth/src/Validators/LoginMessageValidation.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022 Vaughn Nugent +* Copyright (c) 2023 Vaughn Nugent * * Library: VNLib * Package: VNLib.Plugins.Essentials.SocialOauth @@ -40,12 +40,16 @@ namespace VNLib.Plugins.Essentials.SocialOauth.Validators */ public LoginMessageValidation() { - RuleFor(t => t.ClientID) + RuleFor(t => t.ClientId) .Length(10, 50) - .WithMessage("Your browser is not sending required security information"); + .WithMessage("Your browser is not sending required security information") + .IllegalCharacters() + .WithMessage("Your browser is not sending required security information"); RuleFor(t => t.ClientPublicKey) - .NotEmpty() + .Length (50, 1000) + .WithMessage("Your browser is not sending required security information") + .IllegalCharacters() .WithMessage("Your browser is not sending required security information"); //Password is only used for nonce tokens @@ -53,8 +57,9 @@ namespace VNLib.Plugins.Essentials.SocialOauth.Validators RuleFor(t => t.LocalLanguage) .NotEmpty() + .WithMessage("Your language is not supported") + .AlphaNumericOnly() .WithMessage("Your language is not supported"); - RuleFor(t => t.LocalLanguage).AlphaNumericOnly(); } } } -- cgit