Skip to content
Browse files

Moved the OpenID configuration to lib/CPANHQ.pm.

From cpanhq.yml.
  • Loading branch information...
1 parent ecb3f09 commit b75ef36f983115b1f94ff0d7c65dd8b13629fde6 @shlomif shlomif committed
Showing with 31 additions and 19 deletions.
  1. +16 −0 Rejects/cpanhq.yml
  2. +0 −16 cpanhq.yml
  3. +15 −3 lib/CPANHQ.pm
View
16 Rejects/cpanhq.yml
@@ -0,0 +1,16 @@
+Plugin::Authentication:
+ default_realm: openid
+ realms:
+ openid:
+ credential:
+ class: OpenID
+ extension_args:
+ - http://openid.net/extensions/sreg/1.1
+ - required: "email,timezone"
+ optional: "fullname,nickname,timezone"
+ extensions:
+ 'http://openid.net/extensions/sreg/1.1': '1'
+ ua_class: LWPx::ParanoidAgent
+ store:
+ class: Null
+ use_session: '1'
View
16 cpanhq.yml
@@ -5,20 +5,4 @@ Model::DB:
connect_info:
- dbi:SQLite:dbname=__HOME__/cpanhq.db
- undef
-Plugin::Authentication:
- default_realm: openid
- realms:
- openid:
- credential:
- class: OpenID
- extension_args:
- - http://openid.net/extensions/sreg/1.1
- - required: "email,timezone"
- optional: "fullname,nickname,timezone"
- extensions:
- 'http://openid.net/extensions/sreg/1.1': '1'
- ua_class: LWPx::ParanoidAgent
- store:
- class: Null
- use_session: '1'
name: CPANHQ
View
18 lib/CPANHQ.pm
@@ -29,8 +29,20 @@ __PACKAGE__->config(
openid => {
auto_create_user => 1,
credential => {
- class => 'Password',
- password_type => 'none',
+ class => 'OpenID',
+ extensions =>
+ {
+ 'http://openid.net/extensions/sreg/1.1' => '1',
+ },
+ extension_args =>
+ [
+ "http://openid.net/extensions/sreg/1.1",
+ {
+ required => "email,timezone",
+ optional => "fullname,nickname,timezone",
+ },
+ ],
+ ua_class => "LWPx::ParanoidAgent",
},
store => {
class => 'DBIx::Class',
@@ -38,7 +50,7 @@ __PACKAGE__->config(
id_field => 'id',
role_relation => 'roles',
role_field => 'name',
- }
+ },
}
}
}

0 comments on commit b75ef36

Please sign in to comment.
Something went wrong with that request. Please try again.