Revision 450093ec snf-astakos-app/astakos/im/auth_providers.py
b/snf-astakos-app/astakos/im/auth_providers.py | ||
---|---|---|
73 | 73 |
module_active = False |
74 | 74 |
module_enabled = False |
75 | 75 |
one_per_user = False |
76 |
login_prompt = _('Login using') |
|
76 |
login_prompt = _('Login using ') |
|
77 |
primary_login_prompt = _('Login using ') |
|
77 | 78 |
|
78 | 79 |
def get_message(self, msg, **kwargs): |
79 | 80 |
params = kwargs |
... | ... | |
129 | 130 |
module = 'local' |
130 | 131 |
title = _('Local password') |
131 | 132 |
description = _('Create a local password for your account') |
132 |
create_prompt = _('Create an account') |
|
133 | 133 |
add_prompt = _('Create a local password for your account') |
134 | 134 |
login_prompt = _('if you already have a username and password') |
135 |
signup_prompt = _('New to ~Okeanos ?') |
|
135 |
signup_prompt = _('New to ~okeanos ?') |
|
136 |
signup_link_prompt = _('create an account now') |
|
136 | 137 |
|
137 | 138 |
|
138 | 139 |
@property |
... | ... | |
152 | 153 |
return [(_('Change password'), reverse('password_change')), ] |
153 | 154 |
|
154 | 155 |
|
155 |
class LDAPAuthProvider(AuthProvider): |
|
156 |
module = 'ldap' |
|
157 |
title = _('LDAP credentials') |
|
158 |
description = _('Allows you to login using your LDAP credentials') |
|
159 |
|
|
160 |
one_per_user = True |
|
161 |
|
|
162 |
login_template = 'im/auth/local_login_form.html' |
|
163 |
login_prompt_template = 'im/auth/local_login_prompt.html' |
|
164 |
signup_prompt_template = 'im/auth/local_signup_prompt.html' |
|
165 |
details_tpl = _('You can login to your account using your' |
|
166 |
' %(auth_backend)s password.') |
|
167 |
|
|
168 | 156 |
class ShibbolethAuthProvider(AuthProvider): |
169 | 157 |
module = 'shibboleth' |
170 | 158 |
title = _('Academic credentials (Shibboleth)') |
171 |
description = _('Allows you to login to your account using your academic ' |
|
172 |
'credentials') |
|
173 |
add_prompt = _('Add academic credentials to your account.') |
|
159 |
add_prompt = _('Allows you to login to your account using your academic ' |
|
160 |
'account') |
|
174 | 161 |
details_tpl = _('Shibboleth account \'%(identifier)s\' is connected to your ' |
175 | 162 |
' account.') |
176 | 163 |
user_title = _('Academic credentials (%(identifier)s)') |
... | ... | |
189 | 176 |
class TwitterAuthProvider(AuthProvider): |
190 | 177 |
module = 'twitter' |
191 | 178 |
title = _('Twitter') |
192 |
description = _('Allows you to login to your account using your Twitter ' |
|
193 |
'credentials') |
|
194 |
add_prompt = _('Connect with your Twitter account.') |
|
179 |
add_prompt = _('Allows you to login to your account using Twitter') |
|
195 | 180 |
details_tpl = _('Twitter screen name: %(info_screen_name)s') |
196 | 181 |
user_title = _('Twitter (%(info_screen_name)s)') |
197 | 182 |
|
... | ... | |
199 | 184 |
def add_url(self): |
200 | 185 |
return reverse('astakos.im.target.twitter.login') |
201 | 186 |
|
202 |
login_template = 'im/auth/twitter_login.html'
|
|
203 |
login_prompt_template = 'im/auth/twitter_login_prompt.html'
|
|
187 |
login_template = 'im/auth/third_party_provider_generic_login.html'
|
|
188 |
login_prompt_template = 'im/auth/third_party_provider_generic_login_prompt.html'
|
|
204 | 189 |
|
205 | 190 |
|
206 | 191 |
class GoogleAuthProvider(AuthProvider): |
207 | 192 |
module = 'google' |
208 | 193 |
title = _('Google') |
209 |
description = _('Allows you to login to your account using your Google ' |
|
210 |
'credentials') |
|
211 |
add_prompt = _('Connect with your Google account.') |
|
194 |
add_prompt = _('Allows you to login to your account using Google') |
|
212 | 195 |
details_tpl = _('Google account: %(info_email)s') |
213 | 196 |
user_title = _('Google (%(info_email)s)') |
214 | 197 |
|
... | ... | |
223 | 206 |
class LinkedInAuthProvider(AuthProvider): |
224 | 207 |
module = 'linkedin' |
225 | 208 |
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') |
|
209 |
add_prompt = _('Allows you to login to your account using LinkedIn') |
|
230 | 210 |
user_title = _('LinkedIn (%(info_emailAddress)s)') |
211 |
details_tpl = _('LinkedIn account: %(info_emailAddress)s') |
|
231 | 212 |
|
232 | 213 |
@property |
233 | 214 |
def add_url(self): |
Also available in: Unified diff