There is already a UserNameCredentials class in WcfFacility. You should be
able to register an instance of that
class in the container and update the UserName/Password when it is available.
The facility should use that instance
each time.
On Jul 6, 2011, at 10:00 AM, Nicolás Sabena wrote:
> Hi. I'm trying to use the WCFFacility to access a service.
> With plain WCF, I used a MyServiceClient: ClientBase<IMyService>,
> setting the username and password provided by the user:
>
>
> using (var service = new MyServiceClient())
> {
> service.ClientCredentials.UserName.UserName = username;
> service.ClientCredentials.UserName.Password = password;
> service.Authenticate();
> }
>
> I read about doing this with a IChannelFactoryAware implementation,
> using the Created() notification.
>
> Problem is: I don't know the username and password when registering
> components in the container. The authentication data is entered by the
> user, and with this data I have to call (once) this service (I should
> "remember" the username and password, this is to be called only once
> after login).
>
> How should I set the username and password at runtime, just for this
> service, after the user provides the information?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.