« blib/lib/Lemonldap/NG/Common/Module.pm
↑ Summary
blib/lib/Lemonldap/NG/Common/AuditLogger/UserLoggerJSON.pm »
| 1 | package Lemonldap::NG::Common::OpenIDConnect::Constants; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use Exporter 'import'; | ||
| 5 | |||
| 6 | our @EXPORT = ( qw( | ||
| 7 | BACKCHANNEL_EVENTSKEY | ||
| 8 | PROFILE | ||
| 9 | |||
| 10 | ADDRESS | ||
| 11 | PHONE | ||
| 12 | DEFAULT_SCOPES | ||
| 13 | COMPLEX_CLAIM | ||
| 14 | ENC_ALG_SUPPORTED | ||
| 15 | ENC_SUPPORTED | ||
| 16 | ) | ||
| 17 | ); | ||
| 18 | |||
| 19 | use constant BACKCHANNEL_EVENTSKEY => | ||
| 20 | 'http://schemas.openid.net/event/backchannel-logout'; | ||
| 21 | |||
| 22 | # OpenID Connect standard claims | ||
| 23 | use constant PROFILE => [ | ||
| 24 | qw/name family_name given_name middle_name nickname preferred_username | ||
| 25 | profile picture website gender birthdate zoneinfo locale updated_at/ | ||
| 26 | ]; | ||
| 27 | use constant EMAIL => [qw/email email_verified/]; | ||
| 28 | use constant ADDRESS => | ||
| 29 | [qw/formatted street_address locality region postal_code country/]; | ||
| 30 | use constant PHONE => [qw/phone_number phone_number_verified/]; | ||
| 31 | |||
| 32 | use constant DEFAULT_SCOPES => { | ||
| 33 | profile => PROFILE, | ||
| 34 | email => EMAIL, | ||
| 35 | address => ADDRESS, | ||
| 36 | phone => PHONE, | ||
| 37 | }; | ||
| 38 | |||
| 39 | use constant COMPLEX_CLAIM => { | ||
| 40 | formatted => "address", | ||
| 41 | street_address => "address", | ||
| 42 | locality => "address", | ||
| 43 | region => "address", | ||
| 44 | postal_code => "address", | ||
| 45 | country => "address", | ||
| 46 | }; | ||
| 47 | |||
| 48 | use constant ENC_ALG_SUPPORTED => [ qw( | ||
| 49 | RSA-OAEP ECDH-ES RSA-OAEP-256 | ||
| 50 | ECDH-ES+A256KW | ||
| 51 | ECDH-ES+A192KW | ||
| 52 | ECDH-ES+A128KW | ||
| 53 | RSA1_5 | ||
| 54 | ) | ||
| 55 | ]; | ||
| 56 | |||
| 57 | # Unsupported: A128KW A192KW A256KW A128GCMKW A192GCMKW A256GCMKW PBES2-HS256+A128KW PBES2-HS384+A192KW PBES2-HS512+A256KW | ||
| 58 | |||
| 59 | use constant ENC_SUPPORTED => [ qw( | ||
| 60 | A256CBC-HS512 A256GCM A192CBC-HS384 A192GCM A128CBC-HS256 A128GCM | ||
| 61 | ) | ||
| 62 | ]; | ||
| 63 | |||
| 64 | 1; |