C# Class WapPush_App1, API-Platform

WapPush_App1 application
This application allows a user to send a WAP Push message to a mobile device, by entering the address, alert text, and URL to be sent. This application uses Autonomous Client Credentials consumption model to send messages. The user enters the alert text and URL, but the application in the background must build the push.txt file to attach with the requested values.
Inheritance: System.Web.UI.Page
Show file Open project: attdevsupport/API-Platform

Public Methods

Method Description
BypassCertificateError ( ) : void

This method neglects the ssl handshake error with authentication server

Page_Load ( object sender, EventArgs e ) : void

Event, that triggers when the application page is loaded into the web browser, reads the web.config file and gets the values of the attributes

Protected Methods

Method Description
SendWAPButton_Click ( object sender, EventArgs e ) : void

This function is called when user clicks on send wap message button. This function calls send wap message API to send the wap message

Private Methods

Method Description
DrawPanelForFailure ( Panel panelParam, string message ) : void

Displays error message

DrawPanelForSuccess ( Panel panelParam, string message ) : void

Display success message

GetAccessToken ( AccessTokenType type ) : bool

This method gets access token based on either client credentials mode or refresh token.

IsTokenValid ( ) : string

Validates he expiry of the access token and refresh token

IsValidMISDN ( string number ) : bool

This function validates string against the valid msisdn

ReadAccessTokenFile ( ) : bool

This function reads the Access Token File and stores the values of access token, expiry seconds, refresh token, last access token time and refresh token expiry time.

ReadAndGetAccessToken ( ) : bool

This function reads access token file, validates the access token and gets a new access token

ReadConfigFile ( ) : bool

This method reads config file and assigns values to local variables

SendWapPush ( ) : void

This function calls send wap message api to send wap messsage

Method Details

BypassCertificateError() public static method

This method neglects the ssl handshake error with authentication server
public static BypassCertificateError ( ) : void
return void

Page_Load() public method

Event, that triggers when the application page is loaded into the web browser, reads the web.config file and gets the values of the attributes
public Page_Load ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
return void

SendWAPButton_Click() protected method

This function is called when user clicks on send wap message button. This function calls send wap message API to send the wap message
protected SendWAPButton_Click ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
return void