What you describe here is the establishment of a trust relationship in WebSphere. You can't do this via the PUMA SPI but the process is fairly straightforward.
The high level steps are:
- Implement a custom Trust Association Interceptor class
- Register it with WebSphere Application Server
- In your TAI class, return the uid from your original logic.
There are a few tutorials online. Some are simple, as it is an easy process if your requirement is to log in via username / uid. Bear in mind - TAIs are very powerful, so be sure to understand and be certain when your TAI chooses to perform its logic.
Hope this helps,
-Scott H