protected override void ParseApplication(Asn1Element element)
        {
            switch (element.ApplicationTag)
            {
            case KrbApReq.ApplicationTag:
                KrbApReq = new KrbApReq().Decode(element[0]);
                break;

            case KrbApRep.ApplicationTag:
                KrbApRep = new KrbApRep().Decode(element[0]);
                break;
            }
        }
예제 #2
0
        public KerberosContextToken(GssApiToken gssToken = null, ReadOnlyMemory <byte>?data = null)
        {
            var kerb = data ?? gssToken?.Token;

            if (KrbApReq.CanDecode(kerb.Value))
            {
                KrbApReq = KrbApReq.DecodeApplication(kerb.Value);
            }
            else if (KrbApRep.CanDecode(kerb.Value))
            {
                KrbApRep = KrbApRep.DecodeApplication(kerb.Value);
            }
        }