cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Login Module

Former Member
0 Kudos

Hi Experts

I have developped a custom login module to authenticate in portal fron external application.

This external application is developped in ASP, and i need to pass some information from this page to my login module.

According to the SAP Document [http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce9402f3f8031e10000000a1550b0/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce9402f3f8031e10000000a1550b0/content.htm] i create and configure my login module and test. All is OK. But when i try to get the parameters comming from ASP page, i always get null value.

This is my code to get parameter:

HttpGetterCallback hgc = new HttpGetterCallback();
hgc3.setName("ASPPARAM");
hgc3.setType(HttpGetterCallback.REQUEST_PARAMETER);
try {
     this._callback_handler.handle(new Callback[] { hgc });
} catch (Exception e) {
     onthewayexc = e;
} 
String[] aspParam = ((String[]) hgc.getValue());
LOCATION.debugT("login", "req param[] has value " + aspParam[0]);

The attribute aspParam always is null

I saw the http header of this request and i get the follow value:

POST /irj HTTP/1.1
ASPUSERID2
Referer: http://192.168.14.15:50001/post1.asp
Accept-Language: en-US,pt-BR;q=0.5
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Host: 164.164.164.159:50000
Content-Length: 275
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASPSESSIONIDQACQBSQS=GAGFHFBANKGOLBELONFABKII; ASPSESSIONIDCASDDDBA=OBKLPLEAOIEHDAONPDJDJKDI

ASPPARAM=001251228695263&ASPBINARYCODE=001010010000101000100100

As you can see, the parameter ASPARAM is in Request.

Could someone help how to solve this?

Thanks and regards

Marcos Brandao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marcos.

Cookie: ASPSESSIONIDQACQBSQS=GAGFHFBANKGOLBELONFABKII; ASPSESSIONIDCASDDDBA=OBKLPLEAOIEHDAONPDJDJKDI

ASPPARAM=001251228695263&ASPBINARYCODE=001010010000101000100100

As for me it seems that ASPPARAM is a name of a cookie, so try to read a cookie information:

HttpGetterCallback hgc = new HttpGetterCallback();
hgc.setType(HttpGetterCallback.COOKIE);
hgc.setName("ASPPARAM");
CallbackHandler.handle(new Callback[] { hgc });
Object aspParam = hgc.getValue();

Best regards,

Aliaksandr Zhukau

Former Member
0 Kudos

Hi,

This isn't work, because ASPPARAM is a Http request parameter passed via POST action. This cannot be a cookie.

But just to test, i changed and try to call as cookie. How as i imagine, didn't work.

Thanks and regards

Marcos Brandao

Former Member
0 Kudos

Any other suggestion, please...

Regards

Marcos Brandã

Former Member
0 Kudos

In the sample code you posted it looks as though you mixed up two variables, 'hgc' and 'hgc3'.  (You set the type and name in 'hgc3', but then you ignored 'hgc3' and used 'hgc' in the rest of your sample code).

If that bug exists in the code that you were running on NetWeaver then that would explain why you always got a null result.  (But if that bug is only in the code that you posted to this forum, not in the code that you were actually running, then no, sorry, I don't know what the problem is).

Answers (0)