cancel
Showing results for 
Search instead for 
Did you mean: 

Create Custom logon page for SAP Portals

Former Member
0 Kudos

Hi all,

I need to add CAPTCHAs functionality in order to make the end user enter the value of a CAPTCHA image on the logon authentication process I think that I won´t allow me to use a variant from the com.sap.portal.runtime.logon because the logon parameters are the user and password only and I don´t know a way to and a third parameter and also activate the CAPTCHA functionality in a .PAR

That´s why I think that I need to develop a custom logon page without using the com.sap.portal.runtime.logon maybe a Web Dynpro application to create the CAPTCHA and also make the authentication process but what I don´t know is how to make this custom logon page the default logon page for the portal (irj). I was reading about Login Modules but I don´t know is I can set a custom login module for the hole portal application.

Any ideas on how to archive this?

Regards,

Orlando Covault

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Orlando,

You could add the Catpcha on Logon Page?

Regards

Claudio Silva

former_member185086
Active Contributor
0 Kudos

Hi

Have a look for uses of captcha fuction in webdynpro.

[Bid adieu to bots - using CAPTCHAs|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID0696500750DB01393665946564780517End?blog=/pub/wlg/4512]

Best Regards

Satish KUmar

Former Member
0 Kudos

Hi Gourav,

I tried to implement a new Login Module but I think that it will take me to long to implement all the functionalities of the standard logon page fir SAP Portals.

Could you give me any guidelines to implement the captcha functionality in the com.sap.portal.runtime.logon.par?

So far I got this:

<%!

private String createCaptcha(IPortalComponentRequest request){

String CaptchaID="some string";

/* Get the challenge for the specified ID */

BufferedImage image =CaptchaServiceSingleton.getInstance().getImageChallengeForID(CaptchaID,request.getLocale());

/* Create a new file for storing the image */

File outFile =new File(CaptchaID + ".jpg");

try {

/* Write the image to the created file */

ImageIO.write(image, "jpg", outFile);

} catch (IOException e) {

//handle exception

}

/* Get the URL for the generated image */

ByteArrayOutputStream jpegOutputStream = new ByteArrayOutputStream();

JPEGImageEncoder jpegEncoder =JPEGCodec.createJPEGEncoder(jpegOutputStream);

try {

jpegEncoder.encode(image);

byte[] captchaChallengeAsJpeg = jpegOutputStream.toByteArray();

byte[] file = captchaChallengeAsJpeg;

if (file != null) {

// how could I get the URL of the captchaChallengeAsJpeg????

}

} catch (IOException e) {

//handle the exception

}

}

%>

Any guideline would we appreciated.

Regards,

Orlando Covault