Пример #1
0
        public static String AsText(this IdTokenTypes IdTokenTypes)
        {
            switch (IdTokenTypes)
            {
            case IdTokenTypes.Central:
                return("Central");

            case IdTokenTypes.eMAID:
                return("eMAID");

            case IdTokenTypes.ISO14443:
                return("ISO14443");

            case IdTokenTypes.ISO15693:
                return("ISO15693");

            case IdTokenTypes.KeyCode:
                return("KeyCode");

            case IdTokenTypes.Local:
                return("Local");

            case IdTokenTypes.MacAddress:
                return("MacAddress");

            case IdTokenTypes.NoAuthorization:
                return("NoAuthorization");


            default:
                return("unknown");
            }
        }
Пример #2
0
 /// <summary>
 /// Create a case insensitive identifier for authorization.
 /// </summary>
 /// <param name="Value">The hidden case insensitive identification of an RFID tag, or an UUID.</param>
 /// <param name="Type">The type of the identification token.</param>
 /// <param name="AdditionalInfos">Optional information which can be validated by the CSMS in addition to the regular authorization with identification token.</param>
 /// <param name="CustomData">An optional custom data object to allow to store any kind of customer specific data.</param>
 public IdToken(String Value,
                IdTokenTypes Type,
                IEnumerable <AdditionalInfo> AdditionalInfos,
                CustomData CustomData = null)
 {
     this.Value           = Value?.Trim() ?? throw new ArgumentNullException(nameof(Value), "The given identifier must not be null or empty!");
     this.Type            = Type;
     this.AdditionalInfos = AdditionalInfos ?? new AdditionalInfo[0];
     this.CustomData      = CustomData;
 }