public ServiceTicket grantServiceTicket(string id,
                                                Service service, ExpirationPolicy expirationPolicy,
                                                bool credentialsProvided)
        {
            ServiceTicket serviceTicket = new ServiceTicketImpl(id, this,
                                                                service, this.getCountOfUses() == 0 || credentialsProvided,
                                                                expirationPolicy);

            this.updateState();

            List <Authentication> authentications = this.getChainedAuthentications();

            service.setPrincipal(principal: authentications.Last().getPrincipal());

            this.services.Add(id, service);

            return(serviceTicket);
        }
Ejemplo n.º 2
0
        public ServiceTicket grantServiceTicket(string id,
                                                Service service, ExpirationPolicy expirationPolicy,
                                                bool credentialsProvided)
        {
            ServiceTicket serviceTicket = new ServiceTicketImpl(id, this,
                                                                service, this.getCountOfUses() == 0 || credentialsProvided,
                                                                expirationPolicy);

            this.updateState();

            List<Authentication> authentications = this.getChainedAuthentications();
            service.setPrincipal(principal: authentications.Last().getPrincipal());

            this.services.Add(id, service);

            return serviceTicket;
        }