C# Класс WindowsLive.WindowsLiveLogin

Sample implementation of Web Authentication and Delegated Authentication protocol. Also includes trusted sign-in and application verification sample implementations.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DecodeAndValidateToken ( string token ) : string

Decodes and validates the raw token.

DecodeAndValidateToken ( string token, byte cryptKey, byte signKey ) : string

Decodes and validates the raw token with appropriate crypt key and sign key.

DecodeToken ( string token ) : string

Decode the given token. Returns null on failure.

DecodeToken ( string token, byte cryptKey ) : string

Decode the given token. Returns null on failure.

GetAppLoginUrl ( ) : string

Returns the URL needed to retrieve the application security token. The application security token will be generated for the Windows Live site. JavaScript Output Notation (JSON) output is returned: {"token":"<value>"}

GetAppLoginUrl ( string siteId ) : string

Returns the URL needed to retrieve the application security token. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. JSON output is returned: {"token":"<value>"}

GetAppLoginUrl ( string siteId, string ip ) : string

Returns the URL needed to retrieve the application security token. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. The IP address can also optionally be included in 'ip'. JSON output is returned: {"token":"<value>"}

GetAppLoginUrl ( string siteId, string ip, bool js ) : string

Returns the URL needed to retrieve the application security token. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. The IP address can also optionally be included in 'ip'. If 'js' is false, then JSON output is returned: {"token":"<value>"} Otherwise, a JavaScript response is returned. It is assumed that WLIDResultCallback is a custom function implemented to handle the token value: WLIDResultCallback("<tokenvalue>");

GetAppRetCode ( ) : string

Returns a string that can be passed to the GetTrustedParams function as the 'retcode' parameter. If this is specified as the 'retcode', then the app will be used as return URL after it finishes trusted sign-in.

GetAppSecurityToken ( ) : string

Retrieves the application security token for application verification from the application sign-in URL. The application security token will be generated for the Windows Live site.

GetAppSecurityToken ( string siteId ) : string

Retrieves the application security token for application verification from the application sign-in URL. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'.

GetAppSecurityToken ( string siteId, string ip ) : string

Retrieves the application security token for application verification from the application sign-in URL. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. The IP address can also optionally be included in 'ip'. Implementation note: The application security token is downloaded from the application sign-in URL in JSON format {"token":"<value>"}, so we need to extract <value> from the string and return it as seen here.

GetAppVerifier ( ) : string

Generates an Application Verifier token.

GetAppVerifier ( string ip ) : string

Generates an Application Verifier token. An IP address can be included in the token.

GetClearCookieResponse ( string &type, byte &content ) : void

Returns an appropriate content type and body response that the application handler can return to signify a successful sign-out from the application. When a user signs out of Windows Live or a Windows Live application, a best-effort attempt is made to sign the user out from all other Windows Live applications the user might be signed in to. This is done by calling the handler page for each application with 'action' parameter set to 'clearcookie' in the query string. The application handler is then responsible for clearing any cookies or data associated with the sign-in. After successfully signing the user out, the handler should return a GIF (any GIF) as response to the action=clearcookie query.

GetConsentUrl ( string offers ) : string

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.

GetConsentUrl ( string offers, string context ) : string

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.

GetConsentUrl ( string offers, string context, string ru ) : string

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.

GetConsentUrl ( string offers, string context, string ru, string market ) : string

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.

GetLoginUrl ( ) : string

Returns the sign-in URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.

GetLoginUrl ( string context ) : string

Returns the sign-in URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.

GetLoginUrl ( string context, string market ) : string

Returns the sign-in URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.

GetLogoutUrl ( ) : string

Returns the sign-out URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.

GetLogoutUrl ( string market ) : string

Returns the sign-out URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.

GetManageConsentUrl ( ) : string

Returns the URL for the consent-management user interface.

GetManageConsentUrl ( string market ) : string

Returns the URL for the consent-management user interface.

GetRefreshConsentTokenUrl ( string offers, string refreshToken ) : string

Returns the URL to use to download a new consent token, given the offers and refresh token.

GetRefreshConsentTokenUrl ( string offers, string refreshToken, string ru ) : string

Returns the URL to use to download a new consent token, given the offers and refresh token.

GetTrustedLoginUrl ( ) : string

Returns the trusted sign-in URL to use for the Windows Live Login server.

GetTrustedLogoutUrl ( ) : string

Returns the trusted sign-out URL to use for the Windows Live Login server.

GetTrustedParams ( string user ) : NameValueCollection

Returns a table of key-value pairs that must be posted to the sign-in URL for trusted sign-in. Use HTTP POST to do this. Be aware that the values in the table are neither URL nor HTML escaped and may have to be escaped if you are inserting them in code such as an HTML form. The user to be trusted on the local site is passed in as string 'user'.

GetTrustedParams ( string user, string retcode ) : NameValueCollection

Returns a table of key-value pairs that must be posted to the sign-in URL for trusted sign-in. Use HTTP POST to do this. Be aware that the values in the table are neither URL nor HTML escaped and may have to be escaped if you are inserting them in code such as an HTML form. The user to be trusted on the local site is passed in as string 'user'. Optionally, 'retcode' specifies the resource to which successful sign-in is redirected, such as Windows Live Mail, and is typically a string in the format 'id=2000'. If you pass in the value from GetAppRetCode instead, sign-in will be redirected to the application. Otherwise, an HTTP 200 response is returned.

GetTrustedToken ( string user ) : string

Returns the trusted sign-in token in the format needed by the trusted sign-in gadget. User to be trusted on the local site is passed in as string 'user'.

ProcessConsent ( NameValueCollection query ) : ConsentToken

Processes the POST response from the Delegated Authentication service after a user has granted consent. The processConsent function extracts the consent token string and returns the result of invoking the processConsentToken method.

ProcessConsentToken ( string token ) : ConsentToken

Processes the consent token string that is returned in the POST response by the Delegated Authentication service after a user has granted consent.

ProcessConsentToken ( string token, string context ) : ConsentToken

Processes the consent token string that is returned in the POST response by the Delegated Authentication service after a user has granted consent.

ProcessLogin ( NameValueCollection query ) : User

Processes the sign-in response from the Windows Live Login server.

ProcessToken ( string token ) : User

Decodes and validates a Web Authentication token. Returns a User object on success.

ProcessToken ( string token, string context ) : User

Decodes and validates a Web Authentication token. Returns a User object on success. If a context is passed in, it will be returned as the context field in the User object.

RefreshConsentToken ( ConsentToken token ) : ConsentToken

Attempts to obtain a new, refreshed token and return it. The original token is not modified.

RefreshConsentToken ( ConsentToken token, string ru ) : ConsentToken

Attempts to obtain a new, refreshed token and return it. The original token is not modified.

RefreshConsentToken ( string offers, string refreshToken ) : ConsentToken

Attempts to obtain a new, refreshed token and return it using the offers and refresh token. The original token is not modified.

RefreshConsentToken ( string offers, string refreshToken, string ru ) : ConsentToken

Attempts to obtain a new, refreshed token and return it using the offers and refresh token. The original token is not modified.

SignToken ( string token ) : byte[]

Creates a signature for the given string.

SignToken ( string token, byte signKey ) : byte[]

Creates a signature for the given string by using the signature key.

ValidateToken ( string token ) : string

Extracts the signature from the token and validates it.

ValidateToken ( string token, byte signKey ) : string

Extracts the signature from the token and validates it by using the signature key.

WindowsLiveLogin ( bool loadAppSettings ) : System

Initialize the WindowsLiveLogin module from the web.config file if loadAppSettings is true. Otherwise, you will have to manually set the AppId, Secret and SecurityAlgorithm properties. In a Delegated Authentication scenario, you may also specify the return and privacy policy URLs to use, as shown in the Delegated Authentication samples.

WindowsLiveLogin ( bool forceDelAuthNonProvisioned, string policyUrl, string returnUrl ) : System

Initialize the WindowsLiveLogin module with the forceDelAuthNonProvisioned flag, policy URL, and return URL. The 'force_delauth_nonprovisioned' flag indicates whether your application is registered for Delegated Authentication (that is, whether it uses an application ID and secret key). We recommend that your Delegated Authentication application always be registered for enhanced security and functionality.

WindowsLiveLogin ( string settingsFile ) : System

APPID SECRET wsignin1.0 http://[your domain]/[your privacy policy] http://[your domain]/[your return url] In a Delegated Authentication scenario, you may also specify 'returnurl' and 'policyurl' in the settings file. We recommend that you store the Windows Live Login settings file in an area on your server that cannot be accessed through the Internet. This file contains important confidential information. ]]>

WindowsLiveLogin ( string appId, string secret ) : System

Initialize the WindowsLiveLogin module with the application ID and secret key. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users.

WindowsLiveLogin ( string appId, string secret, string securityAlgorithm ) : System

Initialize the WindowsLiveLogin module with the application ID, secret key, and security algorithm. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users.

WindowsLiveLogin ( string appId, string secret, string securityAlgorithm, bool forceDelAuthNonProvisioned ) : System

Initialize the WindowsLiveLogin module with the application ID, secret key, security algorithm and forceDelAuthNonProvisioned flag. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users. The 'force_delauth_nonprovisioned' flag indicates whether your application is registered for Delegated Authentication (that is, whether it uses an application ID and secret key). We recommend that your Delegated Authentication application always be registered for enhanced security and functionality.

WindowsLiveLogin ( string appId, string secret, string securityAlgorithm, bool forceDelAuthNonProvisioned, string policyUrl ) : System

Initialize the WindowsLiveLogin module with the application ID, secret key, security algorithm, forceDelAuthNonProvisioned and policy URL use. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users. The 'force_delauth_nonprovisioned' flag indicates whether your application is registered for Delegated Authentication (that is, whether it uses an application ID and secret key). We recommend that your Delegated Authentication application always be registered for enhanced security and functionality.

WindowsLiveLogin ( string appId, string secret, string securityAlgorithm, bool forceDelAuthNonProvisioned, string policyUrl, string returnUrl ) : System

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

Метод Описание
debug ( string msg ) : void

Stub implementation for logging debug output. You can run a tool such as 'dbmon' to see the output.

derive ( string secret, string prefix ) : byte[]

Derives the key, given the secret key and prefix as described in the Web Authentication SDK documentation.

e64 ( byte b ) : string

Base64-encodes and URL-escapes a byte array.

fetch ( string url ) : string

Fetches the contents given a URL.

getTimestamp ( ) : string

Generates a timestamp suitable for the application verifier token.

parse ( string input ) : NameValueCollection

Parses query string and return a table representation of the key and value pairs. Similar to HttpUtility.ParseQueryString, except that no URL decoding is done and only the last value is considered in the case of multiple values with one key.

parseSettings ( string settingsFile ) : NameValueCollection

Function to parse the settings file.

u64 ( string s ) : byte[]

URL-unescapes and Base64-decodes a string.

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

DecodeAndValidateToken() публичный Метод

Decodes and validates the raw token.
public DecodeAndValidateToken ( string token ) : string
token string
Результат string

DecodeAndValidateToken() публичный Метод

Decodes and validates the raw token with appropriate crypt key and sign key.
public DecodeAndValidateToken ( string token, byte cryptKey, byte signKey ) : string
token string Raw token.
cryptKey byte Crypt key.
signKey byte Sign key.
Результат string

DecodeToken() публичный Метод

Decode the given token. Returns null on failure.
public DecodeToken ( string token ) : string
token string Raw token.
Результат string

DecodeToken() публичный Метод

Decode the given token. Returns null on failure.
public DecodeToken ( string token, byte cryptKey ) : string
token string Raw token.
cryptKey byte Crypt key.
Результат string

GetAppLoginUrl() публичный Метод

Returns the URL needed to retrieve the application security token. The application security token will be generated for the Windows Live site. JavaScript Output Notation (JSON) output is returned: {"token":"<value>"}
public GetAppLoginUrl ( ) : string
Результат string

GetAppLoginUrl() публичный Метод

Returns the URL needed to retrieve the application security token. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. JSON output is returned: {"token":"<value>"}
public GetAppLoginUrl ( string siteId ) : string
siteId string
Результат string

GetAppLoginUrl() публичный Метод

Returns the URL needed to retrieve the application security token. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. The IP address can also optionally be included in 'ip'. JSON output is returned: {"token":"<value>"}
public GetAppLoginUrl ( string siteId, string ip ) : string
siteId string
ip string
Результат string

GetAppLoginUrl() публичный Метод

Returns the URL needed to retrieve the application security token. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. The IP address can also optionally be included in 'ip'. If 'js' is false, then JSON output is returned: {"token":"<value>"} Otherwise, a JavaScript response is returned. It is assumed that WLIDResultCallback is a custom function implemented to handle the token value: WLIDResultCallback("<tokenvalue>");
public GetAppLoginUrl ( string siteId, string ip, bool js ) : string
siteId string
ip string
js bool
Результат string

GetAppRetCode() публичный Метод

Returns a string that can be passed to the GetTrustedParams function as the 'retcode' parameter. If this is specified as the 'retcode', then the app will be used as return URL after it finishes trusted sign-in.
public GetAppRetCode ( ) : string
Результат string

GetAppSecurityToken() публичный Метод

Retrieves the application security token for application verification from the application sign-in URL. The application security token will be generated for the Windows Live site.
public GetAppSecurityToken ( ) : string
Результат string

GetAppSecurityToken() публичный Метод

Retrieves the application security token for application verification from the application sign-in URL. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'.
public GetAppSecurityToken ( string siteId ) : string
siteId string
Результат string

GetAppSecurityToken() публичный Метод

Retrieves the application security token for application verification from the application sign-in URL. By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteId'. The IP address can also optionally be included in 'ip'. Implementation note: The application security token is downloaded from the application sign-in URL in JSON format {"token":"<value>"}, so we need to extract <value> from the string and return it as seen here.
public GetAppSecurityToken ( string siteId, string ip ) : string
siteId string
ip string
Результат string

GetAppVerifier() публичный Метод

Generates an Application Verifier token.
public GetAppVerifier ( ) : string
Результат string

GetAppVerifier() публичный Метод

Generates an Application Verifier token. An IP address can be included in the token.
public GetAppVerifier ( string ip ) : string
ip string
Результат string

GetClearCookieResponse() публичный Метод

Returns an appropriate content type and body response that the application handler can return to signify a successful sign-out from the application. When a user signs out of Windows Live or a Windows Live application, a best-effort attempt is made to sign the user out from all other Windows Live applications the user might be signed in to. This is done by calling the handler page for each application with 'action' parameter set to 'clearcookie' in the query string. The application handler is then responsible for clearing any cookies or data associated with the sign-in. After successfully signing the user out, the handler should return a GIF (any GIF) as response to the action=clearcookie query.
public GetClearCookieResponse ( string &type, byte &content ) : void
type string
content byte
Результат void

GetConsentUrl() публичный Метод

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.
public GetConsentUrl ( string offers ) : string
offers string Comma-delimited list of offers.
Результат string

GetConsentUrl() публичный Метод

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.
public GetConsentUrl ( string offers, string context ) : string
offers string Comma-delimited list of offers.
context string If you specify it, will be returned as-is in the consent /// response for site-specific use.
Результат string

GetConsentUrl() публичный Метод

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.
public GetConsentUrl ( string offers, string context, string ru ) : string
offers string Comma-delimited list of offers.
context string If you specify it, will be returned as-is in the consent /// response for site-specific use.
ru string The registered/configured return URL will be /// overridden by 'ru' specified here.
Результат string

GetConsentUrl() публичный Метод

Returns the consent URL to use for Delegated Authentication for the given comma-delimited list of offers.
public GetConsentUrl ( string offers, string context, string ru, string market ) : string
offers string Comma-delimited list of offers.
context string If you specify it, will be returned as-is in the sign-in /// response for site-specific use.
ru string The registered/configured return URL will be /// overridden by 'ru' specified here.
market string The language in which the consent page is /// displayed is configured by culture ID (For example, 'fr-fr' or /// 'en-us') specified in the 'market' parameter.
Результат string

GetLoginUrl() публичный Метод

Returns the sign-in URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.
public GetLoginUrl ( ) : string
Результат string

GetLoginUrl() публичный Метод

Returns the sign-in URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.
public GetLoginUrl ( string context ) : string
context string If you specify it, will be returned as-is in the sign-in /// response for site-specific use.
Результат string

GetLoginUrl() публичный Метод

Returns the sign-in URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.
public GetLoginUrl ( string context, string market ) : string
context string If you specify it, will be returned as-is in the sign-in /// response for site-specific use.
market string The language in which the sign-in page is /// displayed is configured by culture ID (For example, 'fr-fr' or /// 'en-us') specified in the 'market' parameter.
Результат string

GetLogoutUrl() публичный Метод

Returns the sign-out URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.
public GetLogoutUrl ( ) : string
Результат string

GetLogoutUrl() публичный Метод

Returns the sign-out URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.
public GetLogoutUrl ( string market ) : string
market string The language in which the sign-in page is /// displayed is configured by culture ID (For example, 'fr-fr' or /// 'en-us') specified in the 'market' parameter.
Результат string

GetManageConsentUrl() публичный Метод

Returns the URL for the consent-management user interface.
public GetManageConsentUrl ( ) : string
Результат string

GetManageConsentUrl() публичный Метод

Returns the URL for the consent-management user interface.
public GetManageConsentUrl ( string market ) : string
market string The language in which the consent page is /// displayed is configured by culture ID (For example, 'fr-fr' or /// 'en-us') specified in the 'market' parameter.
Результат string

GetRefreshConsentTokenUrl() публичный Метод

Returns the URL to use to download a new consent token, given the offers and refresh token.
public GetRefreshConsentTokenUrl ( string offers, string refreshToken ) : string
offers string Comma-delimited list of offers.
refreshToken string Refresh token.
Результат string

GetRefreshConsentTokenUrl() публичный Метод

Returns the URL to use to download a new consent token, given the offers and refresh token.
public GetRefreshConsentTokenUrl ( string offers, string refreshToken, string ru ) : string
offers string Comma-delimited list of offers.
refreshToken string Refresh token.
ru string The registered/configured return URL will be /// overridden by 'ru' specified here.
Результат string

GetTrustedLoginUrl() публичный Метод

Returns the trusted sign-in URL to use for the Windows Live Login server.
public GetTrustedLoginUrl ( ) : string
Результат string

GetTrustedLogoutUrl() публичный Метод

Returns the trusted sign-out URL to use for the Windows Live Login server.
public GetTrustedLogoutUrl ( ) : string
Результат string

GetTrustedParams() публичный Метод

Returns a table of key-value pairs that must be posted to the sign-in URL for trusted sign-in. Use HTTP POST to do this. Be aware that the values in the table are neither URL nor HTML escaped and may have to be escaped if you are inserting them in code such as an HTML form. The user to be trusted on the local site is passed in as string 'user'.
public GetTrustedParams ( string user ) : NameValueCollection
user string
Результат System.Collections.Specialized.NameValueCollection

GetTrustedParams() публичный Метод

Returns a table of key-value pairs that must be posted to the sign-in URL for trusted sign-in. Use HTTP POST to do this. Be aware that the values in the table are neither URL nor HTML escaped and may have to be escaped if you are inserting them in code such as an HTML form. The user to be trusted on the local site is passed in as string 'user'. Optionally, 'retcode' specifies the resource to which successful sign-in is redirected, such as Windows Live Mail, and is typically a string in the format 'id=2000'. If you pass in the value from GetAppRetCode instead, sign-in will be redirected to the application. Otherwise, an HTTP 200 response is returned.
public GetTrustedParams ( string user, string retcode ) : NameValueCollection
user string
retcode string
Результат System.Collections.Specialized.NameValueCollection

GetTrustedToken() публичный Метод

Returns the trusted sign-in token in the format needed by the trusted sign-in gadget. User to be trusted on the local site is passed in as string 'user'.
public GetTrustedToken ( string user ) : string
user string
Результат string

ProcessConsent() публичный Метод

Processes the POST response from the Delegated Authentication service after a user has granted consent. The processConsent function extracts the consent token string and returns the result of invoking the processConsentToken method.
public ProcessConsent ( NameValueCollection query ) : ConsentToken
query System.Collections.Specialized.NameValueCollection Response from the Delegated Authentication service.
Результат ConsentToken

ProcessConsentToken() публичный Метод

Processes the consent token string that is returned in the POST response by the Delegated Authentication service after a user has granted consent.
public ProcessConsentToken ( string token ) : ConsentToken
token string Raw token.
Результат ConsentToken

ProcessConsentToken() публичный Метод

Processes the consent token string that is returned in the POST response by the Delegated Authentication service after a user has granted consent.
public ProcessConsentToken ( string token, string context ) : ConsentToken
token string Raw token.
context string If you specify it, will be returned as-is in the sign-in /// response for site-specific use.
Результат ConsentToken

ProcessLogin() публичный Метод

Processes the sign-in response from the Windows Live Login server.
public ProcessLogin ( NameValueCollection query ) : User
query System.Collections.Specialized.NameValueCollection Contains the preprocessed POST query /// such as that returned by HttpRequest.Form
Результат User

ProcessToken() публичный Метод

Decodes and validates a Web Authentication token. Returns a User object on success.
public ProcessToken ( string token ) : User
token string
Результат User

ProcessToken() публичный Метод

Decodes and validates a Web Authentication token. Returns a User object on success. If a context is passed in, it will be returned as the context field in the User object.
public ProcessToken ( string token, string context ) : User
token string Web Authentication token
context string If you specify it, will be returned as-is in the sign-in /// response for site-specific use.
Результат User

RefreshConsentToken() публичный Метод

Attempts to obtain a new, refreshed token and return it. The original token is not modified.
public RefreshConsentToken ( ConsentToken token ) : ConsentToken
token ConsentToken ConsentToken object.
Результат ConsentToken

RefreshConsentToken() публичный Метод

Attempts to obtain a new, refreshed token and return it. The original token is not modified.
public RefreshConsentToken ( ConsentToken token, string ru ) : ConsentToken
token ConsentToken ConsentToken object.
ru string The registered/configured return URL will be /// overridden by 'ru' specified here.
Результат ConsentToken

RefreshConsentToken() публичный Метод

Attempts to obtain a new, refreshed token and return it using the offers and refresh token. The original token is not modified.
public RefreshConsentToken ( string offers, string refreshToken ) : ConsentToken
offers string Comma-delimited list of offers.
refreshToken string Refresh token.
Результат ConsentToken

RefreshConsentToken() публичный Метод

Attempts to obtain a new, refreshed token and return it using the offers and refresh token. The original token is not modified.
public RefreshConsentToken ( string offers, string refreshToken, string ru ) : ConsentToken
offers string Comma-delimited list of offers.
refreshToken string Refresh token.
ru string The registered/configured return URL will be /// overridden by 'ru' specified here.
Результат ConsentToken

SignToken() публичный Метод

Creates a signature for the given string.
public SignToken ( string token ) : byte[]
token string
Результат byte[]

SignToken() публичный Метод

Creates a signature for the given string by using the signature key.
public SignToken ( string token, byte signKey ) : byte[]
token string
signKey byte
Результат byte[]

ValidateToken() публичный Метод

Extracts the signature from the token and validates it.
public ValidateToken ( string token ) : string
token string
Результат string

ValidateToken() публичный Метод

Extracts the signature from the token and validates it by using the signature key.
public ValidateToken ( string token, byte signKey ) : string
token string
signKey byte
Результат string

WindowsLiveLogin() публичный Метод

Initialize the WindowsLiveLogin module from the web.config file if loadAppSettings is true. Otherwise, you will have to manually set the AppId, Secret and SecurityAlgorithm properties. In a Delegated Authentication scenario, you may also specify the return and privacy policy URLs to use, as shown in the Delegated Authentication samples.
public WindowsLiveLogin ( bool loadAppSettings ) : System
loadAppSettings bool
Результат System

WindowsLiveLogin() публичный Метод

Initialize the WindowsLiveLogin module with the forceDelAuthNonProvisioned flag, policy URL, and return URL. The 'force_delauth_nonprovisioned' flag indicates whether your application is registered for Delegated Authentication (that is, whether it uses an application ID and secret key). We recommend that your Delegated Authentication application always be registered for enhanced security and functionality.
public WindowsLiveLogin ( bool forceDelAuthNonProvisioned, string policyUrl, string returnUrl ) : System
forceDelAuthNonProvisioned bool
policyUrl string
returnUrl string
Результат System

WindowsLiveLogin() публичный Метод

APPID SECRET wsignin1.0 http://[your domain]/[your privacy policy] http://[your domain]/[your return url] In a Delegated Authentication scenario, you may also specify 'returnurl' and 'policyurl' in the settings file. We recommend that you store the Windows Live Login settings file in an area on your server that cannot be accessed through the Internet. This file contains important confidential information. ]]>
public WindowsLiveLogin ( string settingsFile ) : System
settingsFile string
Результат System

WindowsLiveLogin() публичный Метод

Initialize the WindowsLiveLogin module with the application ID and secret key. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users.
public WindowsLiveLogin ( string appId, string secret ) : System
appId string
secret string
Результат System

WindowsLiveLogin() публичный Метод

Initialize the WindowsLiveLogin module with the application ID, secret key, and security algorithm. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users.
public WindowsLiveLogin ( string appId, string secret, string securityAlgorithm ) : System
appId string
secret string
securityAlgorithm string
Результат System

WindowsLiveLogin() публичный Метод

Initialize the WindowsLiveLogin module with the application ID, secret key, security algorithm and forceDelAuthNonProvisioned flag. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users. The 'force_delauth_nonprovisioned' flag indicates whether your application is registered for Delegated Authentication (that is, whether it uses an application ID and secret key). We recommend that your Delegated Authentication application always be registered for enhanced security and functionality.
public WindowsLiveLogin ( string appId, string secret, string securityAlgorithm, bool forceDelAuthNonProvisioned ) : System
appId string
secret string
securityAlgorithm string
forceDelAuthNonProvisioned bool
Результат System

WindowsLiveLogin() публичный Метод

Initialize the WindowsLiveLogin module with the application ID, secret key, security algorithm, forceDelAuthNonProvisioned and policy URL use. We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users. The 'force_delauth_nonprovisioned' flag indicates whether your application is registered for Delegated Authentication (that is, whether it uses an application ID and secret key). We recommend that your Delegated Authentication application always be registered for enhanced security and functionality.
public WindowsLiveLogin ( string appId, string secret, string securityAlgorithm, bool forceDelAuthNonProvisioned, string policyUrl ) : System
appId string
secret string
securityAlgorithm string
forceDelAuthNonProvisioned bool
policyUrl string
Результат System

WindowsLiveLogin() публичный Метод

public WindowsLiveLogin ( string appId, string secret, string securityAlgorithm, bool forceDelAuthNonProvisioned, string policyUrl, string returnUrl ) : System
appId string
secret string
securityAlgorithm string
forceDelAuthNonProvisioned bool
policyUrl string
returnUrl string
Результат System