Accepts the Ticket-Granting Ticket from the app running the client.

@param string $tgt
965737
public function setTGT($tgt)
    {
        $this->tgt = $tgt;
        $this->tgtLocation = $this->casServer . $this->casRESTcontext . '/' . $tgt;
    }
380687
public static String getTicketGrantingTicketId(final RequestContext context) {
        val tgtFromRequest = getTicketGrantingTicketIdFrom(context.getRequestScope());
        val tgtFromFlow = getTicketGrantingTicketIdFrom(context.getFlowScope());
        return tgtFromRequest != null ? tgtFromRequest : tgtFromFlow;
    }
1298522
def SetTicketAcceso(self, ta_string):
        ""
        if ta_string:
            ta = SimpleXMLElement(ta_string)
            self.Token = str(ta.credentials.token)
            self.Sign = str(ta.credentials.sign)
            return True
        else:
            raise RuntimeError("Ticket de Acceso vacio!")
1057815
protected void addTicketToRegistry(final Ticket ticket, final TicketGrantingTicket ticketGrantingTicket) {
        LOGGER.debug("Adding ticket [{}] to registry", ticket);
        this.ticketRegistry.addTicket(ticket);
        if (ticketGrantingTicket != null) {
            LOGGER.debug("Updating parent ticket-granting ticket [{}]", ticketGrantingTicket);
            this.ticketRegistry.updateTicket(ticketGrantingTicket);
        }
    }
1077062
public function grantTo($user): void
    {
        $userModel = config('auth.providers.users.model');

        if (is_int($user) && !$userModel::find($user)) {
            return;
        }

        $this->users()->attach($user);
    }
784661
private function _ticketChange($options = [], $action = 'answer', $batch = true)
    {
        try {
            Thread::perform($action, $options, ['batch' => $batch]);
        } catch (ResponseErrorException $e) {
            return false;
        }

        return true;
    }
262388
public function sendNotification($template, $data, $ticket, $notification_owner, $subject, $type)
    {
        /**
         * @var User
         */
        $to = null;

        if ($type != 'agent') {
            $to = $ticket->user;

            if ($ticket->user->email != $notification_owner->email) {
                $to = $ticket->user;
            }

            if ($ticket->agent->email != $notification_owner->email) {
                $to = $ticket->agent;
            }
        } else {
            $to = $ticket->agent;
        }

        if (LaravelVersion::lt('5.4')) {
            $mail_callback = function ($m) use ($to, $notification_owner, $subject) {
                $m->to($to->email, $to->name);

                $m->replyTo($notification_owner->email, $notification_owner->name);

                $m->subject($subject);
            };

            if (Setting::grab('queue_emails') == 'yes') {
                Mail::queue($template, $data, $mail_callback);
            } else {
                Mail::send($template, $data, $mail_callback);
            }
        } elseif (LaravelVersion::min('5.4')) {
            $mail = new \Kordy\Ticketit\Mail\TicketitNotification($template, $data, $notification_owner, $subject);

            if (Setting::grab('queue_emails') == 'yes') {
                Mail::to($to)->queue($mail);
            } else {
                Mail::to($to)->send($mail);
            }
        }
    }
233860
public static function fromProto(ProtoAuthTicket $ticket) : self
    {
        return new self($ticket->getStart()->getContents(), $ticket->getEnd()->getContents(), $ticket->getExpireTimestampMs());
    }
106369
def get_tgt_for(user):
    
    if not settings.CAS_PROXY_CALLBACK:
        raise CasConfigException("No proxy callback set in settings")

    try:
        return Tgt.objects.get(username=user.username)
    except ObjectDoesNotExist:
        logger.warning('No ticket found for user {user}'.format(
            user=user.username
        ))
        raise CasTicketException("no ticket found for user " + user.username)
47840
public static function register($config)
    {

        if ($config['send_errors']) {
            unset($config['send_errors']);

            $logger = new self(TDebugger::$logDirectory);
            $logger->email = & TDebugger::$email;

            TDebugger::setLogger($logger);

            \Errbit::instance()
                ->configure($config);
//                ->start();
        }
    }
972999
public function checkTicket($ticket)
    {
        $url = "https://api.weixin.qq.com/scan/scanticket/check?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['ticket' => $ticket]);
    }
606193
public function setTicket(string $ticket)
    {
        $this->getCache()->set($this->getCacheKey(), $ticket, 1800);

        if (!$this->getCache()->has($this->getCacheKey())) {
            throw new RuntimeException('Failed to cache suite ticket.');
        }

        return $this;
    }
30966
public function update(Request $request, Ticket $ticket)
    {
        $this->authorize('publicUpdate', $ticket);

        $this->validate($request, [
            'subject' => 'required|max:255',
        ]);

        $ticket->update([
            'subject' => $request->subject,
        ]);

        return redirect()->route('laralum_public::tickets.show', ['ticket' => $ticket->id])
            ->with('success', __('laralum_tickets::general.updated', ['id' => $ticket->id]));
    }
575651
function getSubmissionId($submissionTicket) {
		$submission = $this->getSubmission($submissionTicket);
		if (isset($submission)) {
			return $submission->submissionId;
		} else {
			throw new Exception("Invalid submission ticket");
		}
	}
601803
public static function accept() {
        global $USER, $DB;
        if (!isloggedin()) {
            return false;
        }
        if ($USER->policyagreed || !static::is_defined(isguestuser())) {
            return false;
        }

        if (!isguestuser()) {
            // For the guests agreement in stored in session only, for other users - in DB.
            $DB->set_field('user', 'policyagreed', 1, array('id' => $USER->id));
        }
        $USER->policyagreed = 1;
        return true;
    }
703136
private function setCookie($ticket)
	{
		$name = $this->_config['ticketName'];
		$expire_time = (int)$ticket['expire_time'];
		setcookie($name."['id']",$ticket['id'],time()+$expire_time);
		setcookie($name."['create_at']",$ticket['create_at'],time()+$expire_time);
		setcookie($name."['expire_time']",$ticket['expire_time'],time()+$expire_time);
	}
251781
function setupGuild($guild) {
        $guild = $this->getGuildID($guild);
        
        $settings = $this->settings->get($guild);
        if(!$settings) {
            $this->create($guild)->done(null, array($this->client, 'handlePromiseRejection'));
            return;
        }
        
        $this->setup[$guild] = true;
        
        if($guild === 'global' && \array_key_exists('commandPrefix', $settings)) {
            $this->client->setCommandPrefix($settings['commandPrefix'], true);
        }
        
        foreach($this->client->registry->commands as $command) {
            $this->setupGuildCommand($guild, $command, $settings);
        }
        
        foreach($this->client->registry->groups as $group) {
            $this->setupGuildGroup($guild, $group, $settings);
        }
        
        unset($this->setup[$guild]);
    }