Customize change password logic

Hi guys,
We are working on EP 6.0, We need to make our own change password logic for first time user login. ( e.g  new password should be > 10 long,  if he makes a number of unsuccesful operation, his account will be locked , etc...)
For current change password logic, the system calls some .class file provided by SAP.
Can we change the logic of orginal .class ? if not, how can we create our own and use it?
Regards,
Guo Feng

Hi Feng,
You could take a look at the Blog I once posted with its attached Wiki Page where I placed the Source code. You will find it here:
A Change Password Application
However I customized it for a different reason. You can modify the application to add in your business logic.
Let me know if you need more help.
Hope this helped.
Prem

Similar Messages

  • Changing password logic - old password, new password, retype password

    I have a MainFrame class which has a Change Password button. The action for the button is:
              // Change password
              aListener = new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                       ChangeMyPassword cmp = new ChangeMyPassword(
                                     MainFrame.this);
                       cmp.dispose();          
              changePasswordButton.addActionListener(aListener);When the user press the Change Password button, it pass control to the ChangeMyPassword class which as a submit button and a cancel button. When the user press the submit button, it should validate the old password (i.e. compare it to the password in the text file), validate the new password match the retype password:
              // submit button
              ActionListener aListener = new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        // Retrieve the password.
                        char[] pw = oldPasswordField.getPassword();
                        oldPassword = new String(pw).trim();
                        pw = newPasswordField.getPassword();
                        newPassword = new String(pw).trim();
                        pw = retypePasswordField.getPassword();
                        retypePassword = new String(pw).trim();
                        // Hide, but don't dispose of, this window ...
                        // we need to give the client code a chance to
                        // retrieve the user's typed response via
                        // the getPassword() method first.
                        ChangeMyPassword.this.setVisible(false);
              submitButton.addActionListener(aListener);I have a Student class which compare the old password with the password in the text file. The student class constructor takes the student id to identify which student text file it should call.
    The problem is that the ChangeMyPassword does not know about student id (because I am getting these from the text field in MainFrame class). So how can I call the validatePassword method in Student class?
         public boolean validatePassword(String pw) {
              if (pw == null) return false;
              if (pw.equals(password)) return true;
              else return false;
         }

    I don�t understand why it does not update the text file with the new password.
    The submit button has the action in ChangeMyPassword class:
              // submit button
              ActionListener aListener = new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        // Retrieve the password.
                        char[] pw = oldPasswordField.getPassword();
                        oldPassword = new String(pw).trim();
                        pw = newPasswordField.getPassword();
                        newPassword = new String(pw).trim();
                        pw = retypePasswordField.getPassword();
                        retypePassword = new String(pw).trim();
                        Student theStudent = new Student(id);
                        if(theStudent.validatePassword(oldPassword)){
                            if(validateChangePassword()){
                                 // write the new password to file
                                 theStudent.setPassword(getNewPassword());
                                 // Let the user know that the
                                 // password succeeded.
                                 JOptionPane.showMessageDialog(null,
                                  "Password change successfully.",
                                  "Password Changed",
                                  JOptionPane.INFORMATION_MESSAGE);
                            }else{
                                 JOptionPane.showMessageDialog(null,
                                            "You have used an invalid user name or password; please try again.",
                                            "Authentication failed",
                                            JOptionPane.WARNING_MESSAGE);
                       }else{
                            JOptionPane.showMessageDialog(null,
                                       "You have used an invalid user name or password; please try again.",
                                       "Authentication failed",
                                       JOptionPane.WARNING_MESSAGE);                        
                        // Hide, but don't dispose of, this window ...
                        // we need to give the client code a chance to
                        // retrieve the user's typed response via
                        // the getPassword() method first.
                        ChangeMyPassword.this.setVisible(false);
              submitButton.addActionListener(aListener);Validate password method in Student class:
         public boolean validatePassword(String pw) {
              if (pw == null) return false;
              if (pw.equals(password)) return true;
              else return false;
         }Validate change password method in ChangeMyPassword class:
         public boolean validateChangePassword(){
              if(newPassword.equals(retypePassword))return true;
              else return false;
         }When the user press the Change Password button the action performed in the MainFrame class is:
              // Change password
              aListener = new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        String id = ssnField.getText();
                       ChangeMyPassword cmp = new ChangeMyPassword(MainFrame.this, id);
                       boolean success = currentUser.persist();
                       cmp.dispose();          
              changePasswordButton.addActionListener(aListener);Now remember that I set the password that should be written in ChangeMyPassword class as you can see above. Now that I called the persist method, it should write all the details back to the text. For some reason it not doing that and I don�t understand why.
    The persist method:
         public boolean persist() {
              FileOutputStream fos = null;
              PrintWriter pw = null;
              try {
                   // Attempt to create the ssn.dat file.  Note that
                   // it will overwrite one if it already exists.
                   fos = new FileOutputStream("C://Files//" + getSsn() + ".dat");
                   pw = new PrintWriter(fos);
                   // First, we output the header record as a tab-delimited
                   // record.
                   pw.println(getSsn() + "\t" + getName() + "\t" +
                           getMajor() + "\t" + getDegree() + "\t" + getPassword());
                   // Then, we output one record for every Section that
                   // the Student is enrolled in.
                   for (int i = 0; i < attends.size(); i++) {
                        Section s = (Section) attends.elementAt(i);
                        pw.println(s.getFullSectionNo());
                   pw.close();
                   fos.close(); //? needed?
              catch (IOException e) {
                   // Signal that an error has occurred.
                   return false;
              // All is well!
              return true;
         }

  • Why is Change Password is bypassing my customization?

    Hi,
    I have a web service that will allow users to change their passwords.  I created an iView, which calls this web service and this iView is currently able to let users change passwords.  I would like to next customize my the change password screen from the logon.par, so that when an account's password expires and gets prompted with change password, my web service is called.  I know that the logon.par is using the SAPMLogonLogic class and there is a performChangePassword() method in the class.  I have customized the function, exported the class in the umelogonbase.jar, included the jar in my logon.par and deployed that par file.  However, when I tried to test this, I find that the change password is NOT calling my customized code.  It is somehow calling the original functionality, which is puzzling...
    I hope what I said is not confusing...but can anyone enlighten me on why this is happening?  Shouldn't the logon component be executing my customized code?  I customized the performResetPassword() method and the method is working fine..
    Thank You.

    I have just found out that the default changePasswordPage.jsp's action URL is not called when the submit button is clicked.  Very strange.

  • In Portal Anonymous mode - Change password option not coming- login fails

    Hi Experts,
         We are having some application which requires login in anonymous mode. When we click the application and give the user id password, it loggs in properly, there is no problem in that.
        But if the password is reset by administrator, then when entering the reset password given by admin it should ask to change the password. This is happening in normal scenario(/irj/portal), but when try the same in anonymous mode(irj/portal/anonymous) where the prompt is from the login required application, then it says login failed instead of giving the change password and confirm password screen.
    Appreciate your help in solving this issue. I hope many would have faced similar situation.
    Thanks
    Yusuf

    Hi Yusuf.
    Do you use a standard or custom login module for your application?
    More likely the used login module does not have a logic that handles such scenario as a change of user's password.
    In this case you need to implement a custom module with a required functionality.
    Best regards,
    Aliaksandr Zhukau

  • Change Password in OBIEE 11.1.1.6.2

    Hi All,
    We are giving facility to the end users to change the respective password by logging into BI Publisher 11.1.1.6.2 where the Password Change Mechanism has been provided.So when the user change the password in Publisher then the same change will be reflected in OBIEE also.
    Now we have defined some rules for setting the password on Web-logic Console.SO when you try to change the password that rules should be applied while changing the password.
    Issue is that when you try to change the password in BI Publisher the rules are not getting applied.
    any help in this regard.

    Hi,
    I suggesting you better to go with LDAP athunthication. password changes everthing will be taking care by u r domain ctlr. no more option user to change password in obiee11g. the workaround i too tried it but its required couldn't completed its required webservices and j2ee/.net apexternal application code need to check it u r application code development team.drop me your email i can send my code.after getting this code u need to convert webservices and need to get discriptor jar/war file then need to deployit wia weblogic console.after theat JMX java bean need to run it
    In obiee11g users/roles are taking care by FMW.
    for the LDAP confuguration steps
    http://obieedue.blogspot.com/2012/01/obiee11g-integration-with-ldap-and.html
    Thanks
    Deva

  • Using Jackrabbit User Manager programmatically for changing passwords and getting user data.

    I am trying to do a change password request using the Jackrabbit User Manager with the REST URL /system/userManager/user/<username>.changePassword.json.  The problem I am having is that this request requires an oldPwd form param in the request.  The issue is that when I am trying to do this request it is in response to the user selecting "Forgot Password" so our logic has created a random password which we then email to the user so they can use that the next time they want to login.  We need to change that user's password in CRX so they can log in using it next time.  Since they haven't logged in there is no session, NOT the problem.  THE PROBLEMS, I don't know 1. how to use the userManager to get that user's old password, since /system/userManager/user/<username>.json doesn't appear to return the password and 2. if I could get the old password it most certainly will be encoded, some how, so I will need some decoding algorithm to pass it through in order to get the actual password to set as the oldPwd form param to my change password request.  Please let me know if you require any further explanation.  Any assistance would be greatly appreciated.  Thank you, in advance, for your assistance.
    Sincerely,
    Mike Sucena
    [email protected]

    Hi Mike,
    msucena wrote:
    Justin:
    Does your response mean that until version 2.1.2 of Jackrabbit User Manager is released I cannot change the password without knowing the old password?
    No. It means that this feature is not available in version 2.1.0 of the Sling Jackrabbit User Manager bundle. It was added after that release. You have a number of options:
    Build the bundle from source.
    Use one of the SNAPSHOT bundles available from the Apache Snapshots repository.
    Use the release which is being voted upon now (https://repository.apache.org/content/repositories/orgapachesling-175/org/apache/sling/org .apache.sling.jcr.jackrabbit.usermanager/2.2.0/). (Note - we decided to use 2.2.0 as the version number rather than 2.1.2 as originally planned due to the scope of this release).
    Write a different servlet which performs the same actions.
    Meaning that being able to use either the credentials of the "Admin" user or using the credentials of a member of the "UserAdmin" group is not supported in the current released version 2.1.0?
    Correct. It was added after the 2.1.0 release.
      If I currently need the old password is there any Sling REST - Jackrabbit API call I can use in order to get the old password since using /system/userManager/user/<username>.json doesn't appear to return the password?
    -Mike
    The plain text password is not stored. And this should be considered a good thing.
    If you have questions about the development process we follow in Sling (or at Apache as a whole), by all means ask on the Sling users mailing list. It is reasonably well-established and we love to talk about it.

  • Issue in redirecting to change password

    Hi
    I am working on IDM 7.0.I have the following requirement.
    I need to have two links in login.jsp. One for forgot userid and another for forgot password. Inorder to implement this I developed a new custom login.jsp. I have all the functionalities working fine except
    1) When the admin resets a user password,and then the user tries to login, the change password page is not displayed only the error meesage is getting displayed.
    2) When the user clicks forgot your Password link after the user answers the security question page, the change password page is not getting displayed (In system configuration I have set bypasschangepassword to false.) but instead its getting redirected to
    http://localhost:port/idm/user/login.jsp?lang=en&cntry=US&command=fromQuestion
    In login.jsp I have two input fields for username and password. On submit a new jsp is called where I retrieve the username and password and use getSession to create the session and then redirect to main.jsp.
    I am missing out some logic in my login.jsp.I would really appreciate if anyone could give me some ideas.
    Thanks,
    Vinu

    If you upgrade to v7.1 you will have all those features and more - PLUS a lot of defective pieces have been fixed in 7.1

  • How do I customize the password input page of the PDF documented created from Pages?

    Is there a way to customize the password input page of the PDF document created from within Pages?
    I created a document in Pages, on exporting I choose PDF, in the Security Options drop down I checked box password required and typed in a password, then clicked Next, then typed in a file name and then clicked Export. This created a PDF file that when I open with preview brings up a red colored page saying:
    This PDF is password protected.
    Please type the password below.
    Password:
    I want to change the color and the text and potentially add an image. I may also need to put in instruction in multiple languages not just english.
    Please let me know. Thanks all!

    Not that I know of.
    You could control click on the Pages.app and have a look inside the application package's resources to see if any of it looks like password dialog, but my guess is that it has been encoded in the main part of the application and altering that, even if you could, would probably result in a check-sum error or failure to take updates.
    Adobe Acrobat has more control over its .pdfs but its password verification, I think is also part of the application.
    Peter

  • ISE Guest - Change Password Option

    Hi All
    Can anyone confirm that the change password option on the Guest Self Registration Portal actually works?
    I have enabled the options with the ISE Guest Portal to allow the Guest to create his own account and also to change his password.
    Although the self creation of the account works fine it doesn't look like changing the password works. When you enter the new password and click submit nothing seems to happen.
    ISE version is 1.2.1.198
    Regards
    Roger

    Hi Roger,
    Are you making use of customized self registration portal. In such cases make sure , the session ID of a particular guest login is carried forward to the password change page as well.
    For the html changes to any pages (login, aup, self_registration, self_registration_result,
    device_registration & change_password)  that link back to other pages. The below points A and B should be added as part of customized pages.
    A)Reference script (<script src="js/customportals.js"></script>)
    B)Add the onsubmit="getDynamicAction(this);" logic for posts
    Thanks

  • How to enable change password feature in SAP Netweaver Portal 7?

    Hi experts,
    I would like to provide a change password link just beside the logout link after user had successfully logged in to Sap Netweaver portal. When user clicks that link, a change password screen sill appear to allow user to change his/her password.
    Question:
    1) How do i create a link in portal header just beside the logout link?
    2) Is there any default change password page for Sap Netweaver Portal that I can use for this purpose?
    Thanks,
    Kenneth

    Hi,
    To get the change password link beside logout, get the masthead PAR file from portal, import into your NWDS, make the changes in the JSP and upload PAR file back to portal. Search with keyword "Masthead customization" in SDN. You will get many documents to achieve.
    SAP has password change functionality available. Chekc the link below for details.
    Re: Change Password Functionality
    Regards,
    Yoga

  • User Change Password

    User Password changes:
    Ex. Custom Oracle FORM Button Trigger to force DB change Password.
    -- Force an alter user statement to the database.
    -- sys.verify_password function will verify.
    Cmd_Line := 'Alter user "'||:CHANGE_PWD.USER_NAME||
    '" identified by "'||:CHANGE_PWD.VERIFY_PWD||'"';
    FORMS_DDL(cmd_line);
    IF NOT Form_Success THEN
    NOTE(DBMS_ERROR_TEXT); -- display Ora error message
    raise Form_Trigger_Failure;
    END IF;
    Ex. Customize SYS.Verify_Password function sample to return an Error MSG.
    Set for user in Profile, enforces password change syntax rules.
    -- Check for a no space
    isspace:=FALSE;
    FOR j IN 1..m LOOP
    IF substr(PASSWORD_VAR,j,1) = ' ' THEN
    isspace := TRUE;
    GOTO endsearch4;
    END IF;
    END LOOP;
    <<endsearch4>>
    IF (isspace = TRUE) THEN
    raise_application_error(-20003, 'Password cannot contain spaces');
    END IF;

    ...So what is the question???

  • Customize expired password login form

    Hi,
    On the expired login form I don't want to display the resource accounts table so the user can change only Lighthouse password if the password is expired.
    since expired login form uses User Form Library, I copied the default one and renamed it and modified the customized User Form Library accordingly. I managed to removed the resource accounts table so that it displays only 2 text boxes Confirm Password and Confirm New Password. After entering the password and when I click on the Change Password button it displays error "Must Select Atleast one resource account".
    The Change Password button is doing some validation, and I am not sure in which form library this button is defined. I checked in Change Password Form it contains buttons but I don't see any validation on these buttons.
    Where exactly the Change Password button is defined?
    Is there any other way to customize the expire login form?
    Any ideas please..
    Thanks
    Edited by: idmus on May 19, 2010 1:24 PM

    What you describe should work, you just need to simulate the user selecting one or more resources.
    So somewhere on the form put code like:
        <Field name='resourceAccounts.currentResourceAccounts[RESOURCE].selected'>
            <Expansion>
                <s>true</s>
            </Expansion>
        </Field>This acts as if the user has selected a resource. Kind of a weird way to do it, but there you go.
    Edited by: etech on May 24, 2010 4:38 PM
    Edited by: etech on May 24, 2010 4:39 PM

  • MSChapV2 change-password packet request

    Hi!
    I am working around a CISCO ACS server to authorize users access in a  web application. All is done and working but i would like now to support  the password expiry procedure trought the MSChapV2 protocol.
    I edit a user on the server with the password expiration and when i  connect with his credentials i receive the correct message from server:  a AccessReject packet with in MS CHAP ERROR the string with the code 648  (Password expiry).
    I studied the RF2759 and it said that the change-password packet (id =7)  should now be sent to change the old password with a new one.
    I am using jradius to communicate with the server but nothing i found on  internet about it and the use of the change-password packet (examples or  something other).
    Actually i found some sources (es.
    http://www.opensource.apple.com/source/eap8021x/eap8021x-100/EAP8021X.fproj/mschap.c
    )  and i am tring to implement them converting the logic from C to java but  it is going to be a very hard work.
    Does somebody know something (examples, sources, libraries) about the  change-password packet sending?
    Thanks, bye
    Emanuel

    Hi Tarik
    Cant seem to get my screenshot to display
    Anyway i see it from my ACS Monitoring and
    Reports -
    AAA Protocol > AAA Diagnostics
    Severity:
    DEBUG
    ACS Session ID:
    lon-inf-lacs01/142119818/778063
    Date:
    December 31, 2012
    Generated on December 31, 2012 11:27:46 AM GMT
    Dec 31,12 6:23:17.850 AM
    Dec 31,12 6:23:17.823 AM
    lon-inf-lacs01/142119818/778063
    WARN
    TACACS+ authentication request switches from Login to Change Password functionality.
    CSCOacs_TACACS_Diagnostics
    13041
    Thanks for getting back to me
    Steve

  • Regarding Change Password messages

    Hi All,
    I am customizing the Change Password option in Portal. I have created an iview based on com.sap.portal.usermanagement.admin.par file. I have done changes in  JSP user_pwd_modify.jsp
    I want to customize the messages like "Password has been changed." or "Password may not be changed".
    Can someone tell me where are these message stored (in PAR file or database) so that I can customize the messages as well.
    Regards
    Nikhil Bansal

    Hi Nikhil,
    com.sap.portal.runtime.logon.par contains dist\PORTAL-INF\lib\umelogonbase.jar which has bunch of logonMessages(_xx).properties files. Text is there.
    Best regards, Maksim Rashchynski.

  • If someone has wiped my ipad and changed passwords on icloud how do i get my data back

    if someone has wiped my ipad and changed passwords on icloud how do i get my data back? please could someone help me out thanks

    How did they wipe it?  By using Find My iPad and performing a wipe?  If so, that means they have your icloud ID and password, not a good thing.
    You could try connecting it to iTunes and performing a restore from iCloud.  But if they changed password, then you are out of the loop.  How did they get your password in order to change it?

Maybe you are looking for

  • The search feature in Add Places cannot find any locations.

    When I try to add places, the search feature cannot find any locations. I can, however, drag and drop photos onto locations on the map. I've tried contacted support twice and they have not been helpful at all. I would appreciate any help.

  • How to know value of a feild in IDOC for further proccessing

    Hi Guys , I am receiving different sets of IDOC's  in XI with same structure but different Instances.There is feild called company ID in every IDOC._I need to count the number of Idoc's received from a particular companyID and group them_. I came to

  • Labels in forms

    hi all, what is the difference between Single Purchase order - Single item no- Single transport PAckage and Single Purchase Order- Single item no-Multiple transport Package in Shipment terminology? Is there any field for Transport package.? thanks an

  • Alerting/halting user of error in table

    I have validation function that I have for when a user inputs a string into an int only table, in my validation function i have a separate model that has a true or false flag, sets the error flag to true if the user inputted a string or something val

  • Since updating to iOS 8.1 music shuffle keeps turning off. Anyone else?

    Prior to 8.1 music shuffle stayed on until I turned it off. After updating to 8.1 shuffle turns off between uses. Example, I listen to music on shuffle on my way to work, then after a day of using other apps I plug in my iPhone 5 on the way home and