# Copyright (c) 2007 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: UserOTPForm.bunit,v 1.2 2007/09/12 23:27:52 nagler Exp $ FormModel(); req()->set_realm_and_user(qw(otp otp)); shell_util(OTP => [qw(reset_user)]); [ empty_case({ otp_challenge => 'otp_md5 499 yourseed', }), [{ 'OTP.seed' => 'yourseed', old_password => 'A25C5BBC42F2E6D3', new_password => 'A25C5BBC42F2E6D3', confirm_new_password => 'A25C5BBC42F2E6D3', }] => [{ 'Model.OTP' => { sequence => 498, }, }], error_case({ 'OTP.seed' => 'yourseed', old_password => '6DE738A2D535A6CA', new_password => '0C96A50127272151', confirm_new_password => '0C96A50127272151', }, { new_password => 'NOT_ZERO', }), error_case({ 'OTP.seed' => 'yourseed', old_password => '6DE738A2D535A6CA', new_password => 'A25C5BBC42F2E6D3', confirm_new_password => 'A25C5BBC42F2E6D3', }, { old_password => 'OTP_PASSWORD_MISMATCH', }), error_case({ 'OTP.seed' => 'yourseed', old_password => 'A25C5BBC42F2E6D3', new_password => 'A25C5BBC42F2E6D3', confirm_new_password => 'notmatch', }, { confirm_new_password => 'CONFIRM_PASSWORD', }), error_case({ 'OTP.seed' => 'yourseed', old_password => 'A25C5BBC42F2E6D3', new_password => 'not otp pass', confirm_new_password => 'not otp pass', }, { new_password => 'OTP_PASSWORD', }), error_case({ 'OTP.seed' => 'yourseed', old_password => 'A25C5BBC42F2E6D3', new_password => '', confirm_new_password => 'A25C5BBC42F2E6D3', } => { new_password => 'NULL', }), ];