E
Euphilos
Hello,
I'm trying to use WSE 3 in a web service for authentication and
authorization.
I've created a custom UsernameTokenManager overriding VerifyToken to
validate the token against the database and setting the token principal to a
generic principal with all the needed information.
This goes ok, but when I'm trying to find out which user is currently
authenticated, in the web method, using
RequestSoapContext.Current.Credentials.UltimateReceiver.GetClientToken(Of
UsernameToken)().Principal, GetClientToken returns nothing (causing a null
reference exception).
The code above is used in the hands-on lab for WSE3 security, and seems to
work there. I guess I could set the thread principal in VerifyToken, but the
code above seemed the recommended way to go.
Thank you for your help,
Euphilos
I'm trying to use WSE 3 in a web service for authentication and
authorization.
I've created a custom UsernameTokenManager overriding VerifyToken to
validate the token against the database and setting the token principal to a
generic principal with all the needed information.
This goes ok, but when I'm trying to find out which user is currently
authenticated, in the web method, using
RequestSoapContext.Current.Credentials.UltimateReceiver.GetClientToken(Of
UsernameToken)().Principal, GetClientToken returns nothing (causing a null
reference exception).
The code above is used in the hands-on lab for WSE3 security, and seems to
work there. I guess I could set the thread principal in VerifyToken, but the
code above seemed the recommended way to go.
Thank you for your help,
Euphilos