Revision 74796dd8 snf-astakos-app/astakos/im/auth_providers.py

b/snf-astakos-app/astakos/im/auth_providers.py
151 151
    def extra_actions(self):
152 152
        return [(_('Change password'), reverse('password_change')), ]
153 153

  
154

  
154 155
class LDAPAuthProvider(AuthProvider):
155 156
    module = 'ldap'
156 157
    title = _('LDAP credentials')
......
188 189
class TwitterAuthProvider(AuthProvider):
189 190
    module = 'twitter'
190 191
    title = _('Twitter')
191
    description = _('Allows you to login to your account using your twitter '
192
                    'account')
192
    description = _('Allows you to login to your account using your Twitter '
193
                    'credentials')
193 194
    add_prompt = _('Connect with your Twitter account.')
194 195
    details_tpl = _('Twitter screen name: %(info_screen_name)s')
195 196
    user_title = _('Twitter (%(info_screen_name)s)')
......
201 202
    login_template = 'im/auth/twitter_login.html'
202 203
    login_prompt_template = 'im/auth/twitter_login_prompt.html'
203 204

  
205

  
206
class GoogleAuthProvider(AuthProvider):
207
    module = 'google'
208
    title = _('Google')
209
    description = _('Allows you to login to your account using your Google '
210
                    'credentials')
211
    add_prompt = _('Connect with your Google account.')
212
    details_tpl = _('Google account: %(info_email)s')
213
    user_title = _('Google (%(info_email)s)')
214

  
215
    @property
216
    def add_url(self):
217
        return reverse('astakos.im.target.google.login')
218

  
219
    login_template = 'im/auth/third_party_provider_generic_login.html'
220
    login_prompt_template = 'im/auth/third_party_provider_generic_login_prompt.html'
221

  
222

  
223
class LinkedInAuthProvider(AuthProvider):
224
    module = 'linkedin'
225
    title = _('LinkedIn')
226
    description = _('Allows you to login to your account using your LinkedIn '
227
                    'credentials')
228
    add_prompt = _('Connect with your LinkedIn account.')
229
    details_tpl = _('LinkedIn account: %(info_emailAddress)s')
230
    user_title = _('LinkedIn (%(info_emailAddress)s)')
231

  
232
    @property
233
    def add_url(self):
234
        return reverse('astakos.im.target.linkedin.login')
235

  
236
    login_template = 'im/auth/third_party_provider_generic_login.html'
237
    login_prompt_template = 'im/auth/third_party_provider_generic_login_prompt.html'
238

  
239

  
204 240
def get_provider(id, user_obj=None, default=None):
205 241
    """
206 242
    Return a provider instance from the auth providers registry.

Also available in: Unified diff