Esempio n. 1
0
        public SessionSecurityTicket VerifySessionToken(String SessionToken)
        {
            var authService = InfrastructureFactory.CreateAuthenticationService();

            var verificationResult = authService.VerifyToken(SessionToken);

            if (verificationResult.Status == CASResponseCode.OK)
            {
                SessionTokenInformation result = authService.GetSessionTokenInformation(SessionToken);
                return(SessionTokenInformationUtil.getSessionSecurityTicket(result));
            }
            else
            {
                var fault = new VerificationFault();
                fault.Message = "Session token is not valid";

                throw new FaultException <VerificationFault>(fault);
            }
        }
Esempio n. 2
0
        public SessionSecurityTicket VerifySessionToken(String SessionToken)
        {
            ProviderFactory _providerFactory = ProviderFactory.Instance;
            var             service          = _providerFactory.CreateSessionServiceProvider();

            var verificationResult = service.CheckIfSessionIsValid(SessionToken);

            if (verificationResult)
            {
                Session result = service.GetSessionInformation(SessionToken);
                return(SessionTokenInformationUtil.getSessionSecurityTicket(result));
            }
            else
            {
                var fault = new VerificationFault();
                fault.Message = "Session token is not valid";

                throw new FaultException <VerificationFault>(fault);
            }
        }
Esempio n. 3
0
        public SessionSecurityTicket Verify(String SessionToken)
        {
            var authService = InfrastructureFactory.CreateAuthenticationService();

            var verificationResult = authService.VerifyToken(SessionToken);

            if (verificationResult.Status == CASResponseCode.OK)
            {
                try {
                    SessionTokenInformation result = authService.GetSessionTokenInformation(SessionToken);
                    return(SessionTokenInformationUtil.getSessionSecurityTicket(result));
                }catch (Exception) {
                    throw new VerificationException(VerificationException.VerificationException_Message);
                }
            }
            else
            {
                throw new VerificationException(VerificationException.VerificationException_Message);
            }
        }
Esempio n. 4
0
        public SessionSecurityTicket Verify(String SessionToken)
        {
            ProviderFactory _providerFactory = ProviderFactory.Instance;
            var             service          = _providerFactory.CreateSessionServiceProvider();

            var verificationResult = service.CheckIfSessionIsValid(SessionToken);

            if (verificationResult)
            {
                try
                {
                    Session result = service.GetSessionInformation(SessionToken);
                    return(SessionTokenInformationUtil.getSessionSecurityTicket(result));
                }
                catch (Exception)
                {
                    throw new VerificationException(VerificationException.VerificationException_Message);
                }
            }
            else
            {
                throw new VerificationException(VerificationException.VerificationException_Message);
            }
        }