Commits (3)
......@@ -22,6 +22,7 @@ sub portalConsts {
'103' => 'PE_NO_SECOND_FACTORS',
'104' => 'PE_BAD_DEVOPS_FILE',
'105' => 'PE_FILENOTFOUND',
'106' => 'PE_OIDC_AUTH_ERROR',
'2' => 'PE_FORMEMPTY',
'20' => 'PE_NO_PASSWORD_BE',
'21' => 'PE_PP_ACCOUNT_LOCKED',
......
......@@ -113,7 +113,8 @@ sub portalConstants {
PE_UPGRADESESSION => 102,
PE_NO_SECOND_FACTORS => 103,
PE_BAD_DEVOPS_FILE => 104,
PE_FILENOTFOUND => 105
PE_FILENOTFOUND => 105,
PE_OIDC_AUTH_ERROR => 106,
};
}
......
......@@ -6,7 +6,7 @@ use MIME::Base64 qw/encode_base64 decode_base64/;
use Lemonldap::NG::Common::JWT qw(getJWTPayload);
use Lemonldap::NG::Portal::Main::Constants qw(
PE_OK
PE_ERROR
PE_OIDC_AUTH_ERROR
PE_IDPCHOICE
);
......@@ -110,7 +110,7 @@ sub extractFormInfo {
}
else {
$self->userLogger->error("Unable to extract state $state");
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
}
......@@ -119,7 +119,7 @@ sub extractFormInfo {
unless ($op) {
$self->userLogger->error("OpenID Provider not found");
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
$self->logger->debug("Using OpenID Provider $op");
......@@ -135,7 +135,7 @@ sub extractFormInfo {
if $error_description;
$self->logger->error("Error URI: $error_uri") if $error_uri;
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
# Get access_token and id_token
......@@ -148,19 +148,19 @@ sub extractFormInfo {
my $content =
$self->getAuthorizationCodeAccessToken( $req, $op, $code,
$auth_method );
return PE_ERROR unless $content;
return PE_OIDC_AUTH_ERROR unless $content;
my $token_response = $self->decodeTokenResponse($content);
unless ($token_response) {
$self->logger->error("Could not decode Token Response: $content");
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
# Check validity of token response
unless ( $self->checkTokenResponseValidity($token_response) ) {
$self->logger->error("Token response is not valid");
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
else {
$self->logger->debug("Token response is valid");
......@@ -178,7 +178,7 @@ sub extractFormInfo {
{
unless ( $self->verifyJWTSignature( $id_token, $op ) ) {
$self->logger->error("JWT signature verification failed");
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
$self->logger->debug("JWT signature verified");
}
......@@ -190,7 +190,7 @@ sub extractFormInfo {
unless ( defined $id_token_payload_hash ) {
$self->logger->error(
"Could not decode incoming ID token: $id_token");
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
# Check validity of Access Token (optional)
......@@ -199,7 +199,7 @@ sub extractFormInfo {
unless ( $self->verifyHash( $access_token, $at_hash, $id_token ) ) {
$self->userLogger->error(
"Access token hash verification failed");
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
$self->logger->debug("Access token hash verified");
}
......@@ -211,7 +211,7 @@ sub extractFormInfo {
# Check validity of ID Token
unless ( $self->checkIDTokenValidity( $op, $id_token_payload_hash ) ) {
$self->userLogger->error('ID Token not valid');
return PE_ERROR;
return PE_OIDC_AUTH_ERROR;
}
else {
$self->logger->debug('ID Token is valid');
......
......@@ -112,6 +112,7 @@ use constant {
PE_NO_SECOND_FACTORS => 103,
PE_BAD_DEVOPS_FILE => 104,
PE_FILENOTFOUND => 105,
PE_OIDC_AUTH_ERROR => 106,
};
sub portalConsts {
......@@ -130,6 +131,7 @@ sub portalConsts {
'103' => 'PE_NO_SECOND_FACTORS',
'104' => 'PE_BAD_DEVOPS_FILE',
'105' => 'PE_FILENOTFOUND',
'106' => 'PE_OIDC_AUTH_ERROR',
'2' => 'PE_FORMEMPTY',
'20' => 'PE_NO_PASSWORD_BE',
'21' => 'PE_PP_ACCOUNT_LOCKED',
......@@ -328,7 +330,8 @@ our @EXPORT_OK = (
'PE_UPGRADESESSION',
'PE_NO_SECOND_FACTORS',
'PE_BAD_DEVOPS_FILE',
'PE_FILENOTFOUND'
'PE_FILENOTFOUND',
'PE_OIDC_AUTH_ERROR'
);
our %EXPORT_TAGS = ( 'all' => [ @EXPORT_OK, 'import' ], );
......
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"حقول المستخدم وكلمة المرور يجب ملؤهم",
"PE20":"No password backend defined",
"PE21":"حسابك مقفل",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Benutzername oder Passwort nicht eingegeben",
"PE20":"No password backend defined",
"PE21":"Ihr Konto ist blockiert",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"User and password fields must be filled",
"PE20":"No password backend defined",
"PE21":"Your account is locked",
......
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Los campos \"usuario\" y \"password\" deben tener contenido",
"PE20":"No password backend defined",
"PE21":"Su cuenta está bloqueada",
......@@ -334,4 +335,4 @@
"yourProfile":"Conozca su perfil",
"yourTotpKey":"Su llave TOTP",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Käyttäjänimi ja salasana kenttä pitää olla täytetty",
"PE20":"No password backend defined",
"PE21":"Tunnuksesi on lukittu",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"Aucun second facteur disponible pour votre compte",
"PE104":"Fichier DevOps mal formaté",
"PE105":"Fichier inexistant",
"PE106":"Erreur pendant l'authentification auprès du fournisseur OpenID",
"PE2":"Identifiant ou mot de passe non renseigné",
"PE20":"Base des mots de passe non définie",
"PE21":"Votre compte est bloqué",
......
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"ID o password mancante",
"PE20":"No password backend defined",
"PE21":"Account bloccato",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"La tua chiave TOTP",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Onbekende gebruikersnaam of wachtwoord",
"PE20":"No password backend defined",
"PE21":"Uw account is geblokkeerd",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"Na Twoim koncie nie ma dostępnych drugich czynników",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Nazwa użytkownika i hasło muszą być wypełnione",
"PE20":"No password backend defined",
"PE21":"Twoje konto jest zablokowane",
......@@ -334,4 +335,4 @@
"yourProfile":"Twój profil",
"yourTotpKey":"Twój klucz TOTP",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Identificante ou senha não informados",
"PE20":"No password backend defined",
"PE21":"A sua conta está bloqueada",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Identificator sau parolă inexistentă",
"PE20":"No password backend defined",
"PE21":"Contul dvs. este blocat",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"Hesabınız için ikinci faktör kullanılabilir değil",
"PE104":"Kötü DevOps eğitici dosyası",
"PE105":"Dosya bulunamadı",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Kullanıcı adı ve parola alanları doldurulmalı",
"PE20":"Parola back-end'i tanımlanmadı",
"PE21":"Hesabınız kilitli",
......@@ -334,4 +335,4 @@
"yourProfile":"Profilini bil",
"yourTotpKey":"TOTP anahtarınız",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"Các trường người dùng và mật khẩu phải được điền",
"PE20":"No password backend defined",
"PE21":"Tài khoản của bạn bị khóa",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"No second factors available for your account",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"用户名和密码必须填写",
"PE20":"No password backend defined",
"PE21":"您的账号被锁定",
......@@ -334,4 +335,4 @@
"yourProfile":"Know your profile",
"yourTotpKey":"Your TOTP key",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}
......@@ -10,6 +10,7 @@
"PE103":"您的帳號沒有可用的第二因素",
"PE104":"Bad DevOps handler file",
"PE105":"File not found",
"PE106":"Error during authentication with OpenID Provider",
"PE2":"必須填寫使用者與密碼欄位",
"PE20":"No password backend defined",
"PE21":"您的帳號已鎖定",
......@@ -334,4 +335,4 @@
"yourProfile":"知道您的個人檔案",
"yourTotpKey":"您的 TOTP 金鑰",
"yubikey2f":"Yubikey"
}
\ No newline at end of file
}