/// <summary>
        /// Retrieve the current pre-authentication state for a particular PA-Data type.
        /// If the initial state is not present it will be created.
        /// </summary>
        /// <typeparam name="T">The expected type of the returned state instance.</typeparam>
        /// <param name="type">The PA-Data type the state belongs to.</param>
        /// <returns>Returns the current state of the pre-authentication type.</returns>
        public T GetState <T>(PaDataType type)
            where T : PaDataState, new()
        {
            if (!this.PreAuthenticationState.TryGetValue(type, out PaDataState val))
            {
                val = new T();

                this.PreAuthenticationState[type] = val;
            }

            return((T)val);
        }
Example #2
0
 public void RegisterPreAuthHandler(PaDataType type, PreAuthHandlerConstructor builder)
 {
     preAuthHandlers[type] = builder;
 }
 public KerberosPolicyException(PaDataType requestedType)
 {
     this.RequestedType = requestedType;
 }