C# Класс MobileAppAPIHelper, Rockit

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

APIKey() публичный статический Метод

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
Результат string

ValidateAppToken() публичный статический Метод

public static ValidateAppToken ( HttpRequestMessage request ) : bool
request System.Net.Http.HttpRequestMessage
Результат bool