xref: /plugin/authssocas/vendor/apereo/phpcas/source/CAS/ServiceBaseUrl/Interface.php (revision d10b5556242e78d8a430c323b91984ec16415a46)
1*d10b5556SXylle<?php
2*d10b5556SXylle
3*d10b5556SXylle/**
4*d10b5556SXylle * Licensed to Jasig under one or more contributor license
5*d10b5556SXylle * agreements. See the NOTICE file distributed with this work for
6*d10b5556SXylle * additional information regarding copyright ownership.
7*d10b5556SXylle *
8*d10b5556SXylle * Jasig licenses this file to you under the Apache License,
9*d10b5556SXylle * Version 2.0 (the "License"); you may not use this file except in
10*d10b5556SXylle * compliance with the License. You may obtain a copy of the License at:
11*d10b5556SXylle *
12*d10b5556SXylle * http://www.apache.org/licenses/LICENSE-2.0
13*d10b5556SXylle *
14*d10b5556SXylle * Unless required by applicable law or agreed to in writing, software
15*d10b5556SXylle * distributed under the License is distributed on an "AS IS" BASIS,
16*d10b5556SXylle * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17*d10b5556SXylle * See the License for the specific language governing permissions and
18*d10b5556SXylle * limitations under the License.
19*d10b5556SXylle *
20*d10b5556SXylle * PHP Version 7
21*d10b5556SXylle *
22*d10b5556SXylle * @file     CAS/ServerHostname/Interface.php
23*d10b5556SXylle * @category Authentication
24*d10b5556SXylle * @package  PhpCAS
25*d10b5556SXylle * @author   Henry Pan <git@phy25.com>
26*d10b5556SXylle * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
27*d10b5556SXylle * @link     https://wiki.jasig.org/display/CASC/phpCAS
28*d10b5556SXylle */
29*d10b5556SXylle
30*d10b5556SXylle/**
31*d10b5556SXylle * An interface for classes that gets the server name of the PHP server.
32*d10b5556SXylle * This is used to generate service URL and PGT callback URL.
33*d10b5556SXylle *
34*d10b5556SXylle * @class    CAS_ServiceBaseUrl_Interface
35*d10b5556SXylle * @category Authentication
36*d10b5556SXylle * @package  PhpCAS
37*d10b5556SXylle * @author   Henry Pan <git@phy25.com>
38*d10b5556SXylle * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
39*d10b5556SXylle * @link     https://wiki.jasig.org/display/CASC/phpCAS
40*d10b5556SXylle */
41*d10b5556SXylleinterface CAS_ServiceBaseUrl_Interface
42*d10b5556SXylle{
43*d10b5556SXylle
44*d10b5556SXylle    /**
45*d10b5556SXylle     * Get PHP HTTP protocol and server name.
46*d10b5556SXylle     *
47*d10b5556SXylle     * @return string protocol, server hostname, and optionally port,
48*d10b5556SXylle     *                without trailing slash (https://localhost:8443)
49*d10b5556SXylle     */
50*d10b5556SXylle    public function get();
51*d10b5556SXylle
52*d10b5556SXylle    /**
53*d10b5556SXylle     * Check whether HTTPS is used.
54*d10b5556SXylle     *
55*d10b5556SXylle     * This is used to construct the protocol in the URL.
56*d10b5556SXylle     *
57*d10b5556SXylle     * @return bool true if HTTPS is used
58*d10b5556SXylle     */
59*d10b5556SXylle    public function isHttps();
60*d10b5556SXylle
61*d10b5556SXylle}
62