Show / Hide Table of Contents

    Class SecurityToken

    Represents a simple security token schematic.

    Inheritance
    System.Object
    SecurityToken
    Namespace: Cuemon.Security
    Assembly: Cuemon.Security.dll
    Syntax
    public sealed class SecurityToken

    Properties

    | Improve this Doc

    HasExpired

    Gets a value indicating whether this SecurityToken has expired.

    Declaration
    public bool HasExpired { get; }
    Property Value
    Type Description
    System.Boolean

    true if this SecurityToken has expired; otherwise, false.

    | Improve this Doc

    Settings

    Gets the settings applied to this SecurityToken.

    Declaration
    public SecurityTokenSettings Settings { get; }
    Property Value
    Type Description
    SecurityTokenSettings

    The settings applied to this SecurityToken.

    | Improve this Doc

    Token

    Gets the token of this SecurityToken.

    Declaration
    public string Token { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc

    UtcCreated

    Gets the UTC date time value from when this instance was created.

    Declaration
    public DateTime UtcCreated { get; }
    Property Value
    Type Description
    System.DateTime

    Methods

    | Improve this Doc

    Create(SecurityTokenSettings)

    Creates and returns a new SecurityToken from the specified settings.

    Declaration
    public static SecurityToken Create(SecurityTokenSettings settings)
    Parameters
    Type Name Description
    SecurityTokenSettings settings

    The settings to apply to the SecurityToken instance.

    Returns
    Type Description
    SecurityToken

    A new SecurityToken instance.

    | Improve this Doc

    CreateSettings()

    Specifies a set of features to apply on the SecurityToken object.

    Declaration
    public static SecurityTokenSettings CreateSettings()
    Returns
    Type Description
    SecurityTokenSettings

    A SecurityTokenSettings instance that specifies a set of features to apply the SecurityToken object.

    Remarks

    The following table shows the initial property values for an instance of SecurityTokenSettings.

    PropertyInitial Value
    LengthOfToken24
    ReferenceEmpty ("").
    TimeToLive15 seconds
    | Improve this Doc

    CreateSettings(TimeSpan)

    Specifies a set of features to apply on the SecurityToken object.

    Declaration
    public static SecurityTokenSettings CreateSettings(TimeSpan timeToLive)
    Parameters
    Type Name Description
    System.TimeSpan timeToLive

    The amount of time this token remains usable.

    Returns
    Type Description
    SecurityTokenSettings

    A SecurityTokenSettings instance that specifies a set of features to apply on the SecurityToken object.

    | Improve this Doc

    CreateSettings(TimeSpan, Int32)

    Specifies a set of features to apply on the SecurityToken object.

    Declaration
    public static SecurityTokenSettings CreateSettings(TimeSpan timeToLive, int lengthOfToken)
    Parameters
    Type Name Description
    System.TimeSpan timeToLive

    The amount of time this token remains usable.

    System.Int32 lengthOfToken

    The length of the random generated token.

    Returns
    Type Description
    SecurityTokenSettings

    A SecurityTokenSettings instance that specifies a set of features to apply on the SecurityToken object.

    | Improve this Doc

    CreateSettings(TimeSpan, Int32, String)

    Specifies a set of features to apply on the SecurityToken object.

    Declaration
    public static SecurityTokenSettings CreateSettings(TimeSpan timeToLive, int lengthOfToken, string reference)
    Parameters
    Type Name Description
    System.TimeSpan timeToLive

    The amount of time this token remains usable.

    System.Int32 lengthOfToken

    The length of the random generated token.

    System.String reference

    The reference of this token.

    Returns
    Type Description
    SecurityTokenSettings

    A SecurityTokenSettings instance that specifies a set of features to apply on the SecurityToken object.

    | Improve this Doc

    CreateSettings(TimeSpan, String)

    Specifies a set of features to apply on the SecurityToken object.

    Declaration
    public static SecurityTokenSettings CreateSettings(TimeSpan timeToLive, string reference)
    Parameters
    Type Name Description
    System.TimeSpan timeToLive

    The amount of time this token remains usable.

    System.String reference

    The reference of this token.

    Returns
    Type Description
    SecurityTokenSettings

    A SecurityTokenSettings instance that specifies a set of features to apply on the SecurityToken object.

    | Improve this Doc

    Equals(SecurityToken)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(SecurityToken other)
    Parameters
    Type Name Description
    SecurityToken other

    An object to compare with this object.

    Returns
    Type Description
    System.Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    | Improve this Doc

    Equals(Object)

    Determines whether the specified System.Object is equal to this instance.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The System.Object to compare with this instance.

    Returns
    Type Description
    System.Boolean

    true if the specified System.Object is equal to this instance; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    System.Object.GetHashCode()
    | Improve this Doc

    Parse(String)

    Converts the System.String representation to its SecurityToken equivalent.

    Declaration
    public static SecurityToken Parse(string securityToken)
    Parameters
    Type Name Description
    System.String securityToken

    The SecurityToken equivalent created by ToString().

    Returns
    Type Description
    SecurityToken

    A SecurityToken instance.

    | Improve this Doc

    ToString()

    Returns a System.String that represents this instance in the following format: ttl;created;token;.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents this instance in the following format: ttl;created;token;.

    Overrides
    System.Object.ToString()

    Operators

    | Improve this Doc

    Equality(SecurityToken, SecurityToken)

    Indicates whether two SecurityToken instances are equal.

    Declaration
    public static bool operator ==(SecurityToken token1, SecurityToken token2)
    Parameters
    Type Name Description
    SecurityToken token1

    The first token to compare.

    SecurityToken token2

    The second token to compare.

    Returns
    Type Description
    System.Boolean

    true if the values of token1 and token2 are equal; otherwise, false.

    | Improve this Doc

    Inequality(SecurityToken, SecurityToken)

    Indicates whether two SecurityToken instances are not equal.

    Declaration
    public static bool operator !=(SecurityToken token1, SecurityToken token2)
    Parameters
    Type Name Description
    SecurityToken token1

    The first token to compare.

    SecurityToken token2

    The second token to compare.

    Returns
    Type Description
    System.Boolean

    true if the values of token1 and token2 are not equal; otherwise, false.

    Extension Methods

    ConverterExtensions.ParseWith<TSource, TResult>(TSource, Func<TSource, TResult>)
    ConverterExtensions.ParseWith<TSource, T, TResult>(TSource, Func<TSource, T, TResult>, T)
    ConverterExtensions.ParseWith<TSource, T1, T2, TResult>(TSource, Func<TSource, T1, T2, TResult>, T1, T2)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, TResult>(TSource, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, TResult>(TSource, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    ConverterExtensions.As<TResult>(Object)
    ConverterExtensions.As<TResult>(Object, TResult)
    ConverterExtensions.As<TResult>(Object, TResult, IFormatProvider)
    DelegateUtilityExtensions.Wrap<TResult>(TResult)
    DelegateUtilityExtensions.DynamicWrap<TResult>(TResult)
    TweakerExtensions.Adjust<T>(T, Func<T, T>)
    TypeUtilityExtensions.Is<T>(Object)
    TypeUtilityExtensions.IsNot<T>(Object)
    TypeUtilityExtensions.IsNullable<T>(T)
    WrapperExtensions.UseWrapper<T>(T, Action<IDictionary<String, Object>>)
    WrapperExtensions.UseWrapper<T>(T, MemberInfo, Action<IDictionary<String, Object>>)
    EnumerableUtilityExtensions.Yield<TSource>(TSource)
    HashUtilityExtensions.ComputeHash(Object, Action<HashOptions>)
    HmacUtilityExtensions.ComputeKeyedHash(Object, Byte[], Action<KeyedHashOptions>)
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX