Details
The dummy plugin uses no credentials at the moment to communicate afterward with the ERP.
UseCase
Example for plugin read credentials
Extend powerGateServer config:
<behaviors>
<serviceBehaviors>
<behavior>
<log4net />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="WCF_UserAuthentication.UserAuthentication, WCF_UserAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
Im Plugin ist es zu erweitern, das wird für jeden Service verwendet:
using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
namespace WCF_UserAuthentication
{
public class UserAuthentication : UserNamePasswordValidator
{
public override void Validate(string userName, string password)
{
if (userName == null || null == password)
throw new ArgumentNullException();
if (!(userName == "coolOrange") || !(password == "coo!Orange"))
throw new SecurityTokenException("Unknown Username or Password");
}
}
}
Details
The dummy plugin uses no credentials at the moment to communicate afterward with the ERP.
UseCase
Example for plugin read credentials
Extend powerGateServer config:
Im Plugin ist es zu erweitern, das wird für jeden Service verwendet: