You can, but you’ll have to jump through a few hoops. In the JSP, submit the userName and password as variables to tn:receive (even though TN doesn’t care about them - they will remain in the pipeline throughout the service).
In your processing rule, call a flow service. In the flow service, call wm.tn.profile.getExtendedFields (providing it the ID of the partner whose profile you want to examine - also the group if desired). Compare the results against the variables your JSP passed to TN - they should just be floating around in the pipeline.
I just tested this with a standard HTML form - not JSP - and submitted the username and password as hidden variables within the form call private.user and private.password. In my processing rule, I mapped the receiver ID of the document to the partnerID input of getExtendedFields and then compared the result against the value of private.user and private.password. Worked great.
Keep in mind this is not real authentication, however. This is post-processing. It is IS that is responsible for true TN authentication.
#webMethods#B2B-Integration#Integration-Server-and-ESB