C# Class com.microsoft.dx.officewopi.Utils.WopiUtil

Afficher le fichier Open project: OfficeDev/PnP-WOPI Class Usage Examples

Méthodes publiques

Méthode Description
GetActionUrl ( WopiAction action, FileModel file, string authority ) : string

Forms the correct action url for the file and host

GetDiscoveryInfo ( ) : Task>

Gets the discovery information from WOPI discovery and caches it appropriately

PopulateActions ( this file ) : System.Threading.Tasks.Task

Populates a file with action details from WOPI discovery based on the file extension

PopulateActions ( this files ) : System.Threading.Tasks.Task

Populates a list of files with action details from WOPI discovery

ValidateWopiProof ( HttpContext context ) : Task

Validates the WOPI Proof on an incoming WOPI request

Private Methods

Méthode Description
getWopiProof ( HttpContext context ) : Task

Gets the WOPI proof details from the WOPI discovery endpoint and caches it appropriately

verifyProof ( byte expectedProof, string proofFromRequest, string proofFromDiscovery ) : bool

Verifies the proof against a specified key

Method Details

GetActionUrl() public static méthode

Forms the correct action url for the file and host
public static GetActionUrl ( WopiAction action, FileModel file, string authority ) : string
action com.microsoft.dx.officewopi.Models.Wopi.WopiAction
file com.microsoft.dx.officewopi.Models.FileModel
authority string
Résultat string

GetDiscoveryInfo() public static méthode

Gets the discovery information from WOPI discovery and caches it appropriately
public static GetDiscoveryInfo ( ) : Task>
Résultat Task>

PopulateActions() public static méthode

Populates a file with action details from WOPI discovery based on the file extension
public static PopulateActions ( this file ) : System.Threading.Tasks.Task
file this
Résultat System.Threading.Tasks.Task

PopulateActions() public static méthode

Populates a list of files with action details from WOPI discovery
public static PopulateActions ( this files ) : System.Threading.Tasks.Task
files this
Résultat System.Threading.Tasks.Task

ValidateWopiProof() public static méthode

Validates the WOPI Proof on an incoming WOPI request
public static ValidateWopiProof ( HttpContext context ) : Task
context System.Web.HttpContext
Résultat Task