Search Results for

Show / Hide Table of Contents

# Class UploadSecurityContext

##### Inheritance

object
UploadSecurityContext

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: CoreUpload.Security

###### Assembly: CoreUpload.dll

##### Syntax

    public class UploadSecurityContext

### Constructors

#### UploadSecurityContext(IDataProtectionProvider)

##### Declaration

    public UploadSecurityContext(IDataProtectionProvider dataProtection)

##### Parameters

Type | Name | Description
--- | --- | ---
IDataProtectionProvider | dataProtection |

### Methods

#### CreateToken(UploadSecurityData)

##### Declaration

    public string CreateToken(UploadSecurityData data)

##### Parameters

Type | Name | Description
--- | --- | ---
UploadSecurityData | data |

##### Returns

Type | Description
--- | ---
string |

#### ValidateToken(string)

Validates and decodes a protected upload-policy token. Returns null when the token is tampered, malformed, or past its ExpiresUtc.

##### Declaration

    public UploadSecurityData? ValidateToken(string token)

##### Parameters

Type | Name | Description
--- | --- | ---
string | token |

##### Returns

Type | Description
--- | ---
UploadSecurityData |