Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 103... Línea 103...
103
     */
103
     */
104
    public function getStartUrl()
104
    public function getStartUrl()
105
    {
105
    {
106
        return $this->startUrl;
106
        return $this->startUrl;
107
    }
107
    }
-
 
108
 
-
 
109
    /**
-
 
110
     * Creates an instance of SsoToken from a token data.
-
 
111
     *
-
 
112
     * @param $tokenData
-
 
113
     *
-
 
114
     * @return SsoToken
-
 
115
     */
-
 
116
    public static function fromTokenData($tokenData): SsoToken
-
 
117
    {
-
 
118
        return new SsoToken(
-
 
119
            $tokenData['accessToken'],
-
 
120
            \strtotime($tokenData['expiresAt']),
-
 
121
            isset($tokenData['refreshToken']) ? $tokenData['refreshToken'] : null,
-
 
122
            isset($tokenData['clientId']) ? $tokenData['clientId'] : null,
-
 
123
            isset($tokenData['clientSecret']) ? $tokenData['clientSecret'] : null,
-
 
124
            isset($tokenData['registrationExpiresAt']) ? $tokenData['registrationExpiresAt'] : null,
-
 
125
            isset($tokenData['region']) ? $tokenData['region'] : null,
-
 
126
            isset($tokenData['startUrl']) ? $tokenData['startUrl'] : null
-
 
127
        );
-
 
128
    }
108
}
129
}