Subversion Repositories oidplus

Rev

Rev 1372 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1372 Rev 1374
Line 62... Line 62...
62
                        if (!OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_ENABLED', false)) {
62
                        if (!OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_ENABLED', false)) {
63
                                throw new OIDplusException(_L('Google OAuth authentication is disabled on this system.'), $out['title']);
63
                                throw new OIDplusException(_L('Google OAuth authentication is disabled on this system.'), $out['title']);
64
                        }
64
                        }
65
 
65
 
66
                        $out['text']  = '<p>'._L('Please wait...').'</p>';
66
                        $out['text']  = '<p>'._L('Please wait...').'</p>';
-
 
67
                        $out['text'] .= '<noscript>';
-
 
68
                        $out['text'] .= '<p><font color="red">'._L('You need to enable JavaScript to use this feature.').'</font></p>';
-
 
69
                        $out['text'] .= '</noscript>';
67
                        $out['text'] .= '<form action="https://accounts.google.com/o/oauth2/v2/auth" method="GET">';
70
                        $out['text'] .= '<form action="https://accounts.google.com/o/oauth2/v2/auth" method="GET">';
68
                        $out['text'] .= '<input type="hidden" name="response_type" value="'.htmlentities('code').'">'."\n";
71
                        $out['text'] .= '<input type="hidden" name="response_type" value="'.htmlentities('code').'">'."\n";
69
                        $out['text'] .= '<input type="hidden" name="client_id" value="'.htmlentities(OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_CLIENT_ID')).'">'."\n";
72
                        $out['text'] .= '<input type="hidden" name="client_id" value="'.htmlentities(OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_CLIENT_ID')).'">'."\n";
70
                        $out['text'] .= '<input type="hidden" name="scope" value="'.htmlentities(implode(' ', array(/*'openid',*/ 'email', 'profile'))).'">'."\n";
73
                        $out['text'] .= '<input type="hidden" name="scope" value="'.htmlentities(implode(' ', array(/*'openid',*/ 'email', 'profile'))).'">'."\n";
71
                        $out['text'] .= '<input type="hidden" name="redirect_uri" value="'.htmlentities('').'">'."\n"; // URL will be filled by JavaScript
74
                        $out['text'] .= '<input type="hidden" name="redirect_uri" value="'.htmlentities('').'">'."\n"; // URL will be filled by JavaScript