Ejemplo n.º 1
0
        public async Task <DecryptedData> Validate(byte[] requestBytes)
        {
            var kerberosRequest = KerberosRequest.Parse(requestBytes);

            Logger.WriteLine(kerberosRequest.ToString());

            var decryptedToken = kerberosRequest.Decrypt(keytab);

            if (decryptedToken == null)
            {
                return(null);
            }

            Logger.WriteLine(decryptedToken.ToString());

            decryptedToken.Now = Now;

            if (ValidateAfterDecrypt > 0)
            {
                await Validate(decryptedToken);
            }

            return(decryptedToken);
        }
Ejemplo n.º 2
0
        public static KerberosRequest Parse(byte[] data)
        {
            var ticket = new KerberosRequest(data);

            return(ticket);
        }