Пример #1
0
 /// <summary>
 ///   Sign in the service for relational database "MembershipPlus" and authenticate the identity of the caller.
 /// Depending on the end points, the authentication may have been delegated to the host. E.g., the end point serving javascript
 /// requests are delegated to Asp.Net website authentication system. For other end points, the caller must provide correct credentials
 /// in order to have permission to continue the call processing.
 /// </summary>
 /// <remarks>
 ///   Note: The current version of the system does not check for credentials. It also does not validate the returned caller context object.
 /// Therefore care must be taken to limit the access to the service to trusted nodes or users within a secured network environment.
 /// </remarks>
 /// <param name="cntx">Caller supplied and initialized caller context. If it is null, the service will create an initial one.</param>
 /// <param name="credentials">Caller credential information.</param>
 /// <returns>
 ///   An initialized caller context object used for subsequent API calls. Supplying an invalid caller context will
 /// result in a deny of the service.
 /// </returns>
 public CallContext SignInService(CallContext cntx, CallerCredentials credentials)
 {
     try
     {
         return(Channel.SignInService(cntx, credentials));
     }
     catch (Exception ex)
     {
         HandleError(ex);
         return(null);
     }
 }
Пример #2
0
 /// <summary>
 ///   Sign in the service for relational database "MembershipPlus" and authenticate the identity of the caller.
 /// Depending on the end points, the authentication may have been delegated to the host. E.g., the end point serving javascript
 /// requests are delegated to Asp.Net website authentication system. For other end points, the caller must provide correct credentials
 /// in order to have permission to continue the call processing.
 /// </summary>
 /// <remarks>
 ///   Note: The current version of the system does not check for credentials. It also does not validate the returned caller context object.
 /// Therefore care must be taken to limit the access to the service to trusted nodes or users within a secured network environment.
 /// </remarks>
 /// <param name="cntx">Caller supplied and initialized caller context. If it is null, the service will create an initial one.</param>
 /// <param name="credentials">Caller credential information.</param>
 /// <returns>
 ///   An initialized caller context object used for subsequent API calls. Supplying an invalid caller context will
 /// result in a deny of the service.
 /// </returns>
 public async System.Threading.Tasks.Task <CallContext> SignInServiceAsync(CallContext cntx, CallerCredentials credentials)
 {
     try
     {
         return(await Channel.SignInServiceAsync(cntx, credentials));
     }
     catch (Exception ex)
     {
         HandleError(ex);
         return(null);
     }
 }