Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+12 -6
View File
@@ -37,7 +37,7 @@ abstract class _OAuth1 extends \IPS\Login\Handler
public function acpForm()
{
$return = array(
array( 'login_handler_oauth_settings', static::getTitle() . '_info' ),
array( 'login_handler_oauth_settings', \IPS\Member::loggedIn()->language()->addToStack( static::getTitle() . '_info', FALSE, array( 'sprintf' => array( (string) $this->redirectionEndpoint() ) ) ) ),
'consumer_key' => new \IPS\Helpers\Form\Text( 'oauth_consumer_key', ( isset( $this->settings['consumer_key'] ) ) ? $this->settings['consumer_key'] : '', TRUE ),
'consumer_secret' => new \IPS\Helpers\Form\Text( 'oauth_consumer_secret', ( isset( $this->settings['consumer_secret'] ) ) ? $this->settings['consumer_secret'] : '', TRUE ),
);
@@ -125,11 +125,7 @@ abstract class _OAuth1 extends \IPS\Login\Handler
*/
protected function _redirectToAuthorizationEndpoint( \IPS\Login $login )
{
$callback = $login->url->setQueryString( '_processLogin', $this->id )->csrf();
if ( isset( \IPS\Request::i()->ref ) )
{
$callback = $callback->setQueryString( 'ref', \IPS\Request::i()->ref );
}
$callback = $this->redirectionEndpoint()->setQueryString( 'state' , $this->id . '-' . base64_encode( $login->url ) . '-' . \IPS\Session::i()->csrfKey . '-' . \IPS\Request::i()->ref );
try
{
@@ -297,6 +293,16 @@ abstract class _OAuth1 extends \IPS\Login\Handler
* @return \IPS\Http\Url
*/
abstract protected function accessTokenEndpoint();
/**
* Redirection Endpoint
*
* @return \IPS\Http\Url
*/
public function redirectionEndpoint()
{
return \IPS\Http\Url::internal( 'oauth/callback/', 'none' );
}
/**
* Send Request