Subversion Repositories oidplus

Rev

Rev 1116 | Rev 1131 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1116 Rev 1130
Line 113... Line 113...
113
        /**
113
        /**
114
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.5
114
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.5
115
         * @return array
115
         * @return array
116
         * @throws OIDplusException
116
         * @throws OIDplusException
117
         */
117
         */
118
        public function alternativeLoginMethods() {
118
        public function alternativeLoginMethods(): array {
119
                $logins = array();
119
                $logins = array();
120
                if (OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_ENABLED', false)) {
120
                if (OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_ENABLED', false)) {
121
                        $logins[] = array(
121
                        $logins[] = array(
122
                                'oidplus:login_google',
122
                                'oidplus:login_google',
123
                                _L('Login using Google'),
123
                                _L('Login using Google'),
Line 127... Line 127...
127
                return $logins;
127
                return $logins;
128
        }
128
        }
129
 
129
 
130
        /**
130
        /**
131
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.8
131
         * Implements interface 1.3.6.1.4.1.37476.2.5.2.3.8
132
         * @param $user
132
         * @param string|null $user
133
         * @return array
133
         * @return array
134
         * @throws OIDplusException
134
         * @throws OIDplusException
135
         */
135
         */
136
        public function getNotifications($user=null): array {
136
        public function getNotifications(string $user=null): array {
137
                $notifications = array();
137
                $notifications = array();
138
                if ((!$user || ($user == 'admin')) && OIDplus::authUtils()->isAdminLoggedIn()) {
138
                if ((!$user || ($user == 'admin')) && OIDplus::authUtils()->isAdminLoggedIn()) {
139
                        if (OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_ENABLED', false)) {
139
                        if (OIDplus::baseConfig()->getValue('GOOGLE_OAUTH2_ENABLED', false)) {
140
                                if (!function_exists('curl_init')) {
140
                                if (!function_exists('curl_init')) {
141
                                        $title = _L('Google OAuth Login');
141
                                        $title = _L('Google OAuth Login');