@@ -1,16 +1,16 | |||||
1 | # Mocks out OpenID |
|
1 | # Mocks out OpenID | |
2 | # |
|
2 | # | |
3 | # http://www.northpub.com/articles/2007/04/02/testing-openid-support |
|
3 | # http://www.northpub.com/articles/2007/04/02/testing-openid-support | |
4 |
module OpenIdAuthentication |
|
4 | module OpenIdAuthentication | |
5 |
|
5 | |||
6 | EXTENSION_FIELDS = {'email' => 'user@somedomain.com', |
|
6 | EXTENSION_FIELDS = {'email' => 'user@somedomain.com', | |
7 | 'nickname' => 'cool_user', |
|
7 | 'nickname' => 'cool_user', | |
8 | 'country' => 'US', |
|
8 | 'country' => 'US', | |
9 | 'postcode' => '12345', |
|
9 | 'postcode' => '12345', | |
10 | 'fullname' => 'Cool User', |
|
10 | 'fullname' => 'Cool User', | |
11 | 'dob' => '1970-04-01', |
|
11 | 'dob' => '1970-04-01', | |
12 | 'language' => 'en', |
|
12 | 'language' => 'en', | |
13 |
'timezone' => 'America/New_York'} |
|
13 | 'timezone' => 'America/New_York'} | |
14 |
|
14 | |||
15 | protected |
|
15 | protected | |
16 |
|
16 | |||
@@ -31,7 +31,7 module OpenIdAuthentication | |||||
31 |
|
31 | |||
32 | yield Result[:successful], identity_url , extension_response_fields |
|
32 | yield Result[:successful], identity_url , extension_response_fields | |
33 | else |
|
33 | else | |
34 |
logger.info "OpenID authentication failed: #{identity_url}" |
|
34 | logger.info "OpenID authentication failed: #{identity_url}" | |
35 | yield Result[:failed], identity_url, nil |
|
35 | yield Result[:failed], identity_url, nil | |
36 | end |
|
36 | end | |
37 | end |
|
37 | end |
General Comments 0
You need to be logged in to leave comments.
Login now