StreamLink.NET
CredentialsProvider Property
StreamLink.NETCaplin.StreamLinkIStreamLinkCredentialsProvider
Gets or sets the ICredentialsProvider, which provides the user credentials that StreamLink uses to log in to a Liberator server.
Declaration Syntax
C#Visual BasicVisual C++
ICredentialsProvider CredentialsProvider { get; set; }
Property CredentialsProvider As ICredentialsProvider
property ICredentialsProvider^ CredentialsProvider {
	ICredentialsProvider^ get ();
	void set (ICredentialsProvider^ value);
}
Value
Remarks

StreamLink uses the ICredentialsProvider to retrieve the user credentials needed to log in to Liberator.

The application must register an ICredentialsProvider with StreamLink by setting the CredentialsProvider property of the StreamLink object, otherwise StreamLink will report a login failure when it tries to connect to the Liberator.

Examples
CopyC#
using System;
using System.Collections.Generic;
using System.Text;

namespace Caplin.StreamLink.Authentication
{
    /// <summary>
    /// Implements a credentials provider with a non-changing username and password
    /// </summary>
    public class CredentialsProvider : ICredentialsProvider
    {
        private string _password;
        private string _username;

        /// <summary>
        /// Initializes a new instance of the PasswordCredentials class.
        /// </summary>
        /// <param name="username">The username.</param>
        /// <param name="password">The password.</param>
        public CredentialsProvider(string username, string password)
        {
            _username = username;
            _password = password;
        }

        #region ICredentialsProvider Members

        /// <summary>
        /// Gets the credentials used to login to the Liberator.
        /// </summary>
        /// <value>The credentials.</value>
        public ICredentials Credentials
        {
            get { return new Credentials(_username, _password); }
        }

        #endregion
    }
}

Assembly: Caplin.StreamLink (Module: Caplin.StreamLink) Version: 5.0.19.0 (5.0.19.0)