/// <summary>
        /// Parse the configuration section and create an object holding the parent applicaitons credentials.
        /// </summary>
        /// <returns>The configuration section and create an object holding the parent applicaitons credentials.</returns>
        public ConsumerApplication GetApplicationCredentials()
        {
            var application = new ConsumerApplication
            {
                AccessTokenUrl = this.AccessTokenUrl,
                ApplicationId = this.ApplicationId,
                ApplicationSecret = this.ApplicationSecret,
                AuthorizeUrl = this.AuthorizeUrl,
                AuthorizedScopes = this.AuthorizedScopes.Split(' '),
                CallbackUri = this.CallbackUri
            };

            return application;
        }
        /// <summary>
        /// Initialises a new instance of the <see cref="AuthenticationClient"/> class.
        /// </summary>
        /// <param name="applicationIdentity">Authentication information for the parent application.</param>
        public AuthenticationClient(ConsumerApplication applicationIdentity)
        {
            Guard.IsNotNull(applicationIdentity, "applicationIdentity", "An authentication client must have an application identity.");

            this._consumerApplication = applicationIdentity;
        }