C# Class MobileAppAPIHelper, Rockit

Afficher le fichier Open project: NewPointe/Rockit

Méthodes publiques

Méthode Description
APIKey ( ) : string

This will pull the api key generated in rock. The name of it needs to be AppRestKey. It can be changed whenever from the website, this function will pull it based on the name in case the key becomes compromised if it can't find it, it will return empty string and the request will return unauthorized

ValidateAppToken ( HttpRequestMessage request ) : bool

Private Methods

Méthode Description
ValidateToken ( string token ) : bool

this just verifies (loosely) that the request came from the app. By matching the key stored in the app's code.

Method Details

APIKey() public static méthode

This will pull the api key generated in rock. The name of it needs to be AppRestKey. It can be changed whenever from the website, this function will pull it based on the name in case the key becomes compromised if it can't find it, it will return empty string and the request will return unauthorized
public static APIKey ( ) : string
Résultat string

ValidateAppToken() public static méthode

public static ValidateAppToken ( HttpRequestMessage request ) : bool
request System.Net.Http.HttpRequestMessage
Résultat bool