Method | Description | |
---|---|---|
BuildAuthorizeUri ( string state, string deviceId, string deviceName = null, string responseType = "code" ) : |
Authorization request
|
|
GetToken ( string code ) : Task |
Get an access token
|
|
GetValidToken ( ) : Task |
Refreshes the token if needed
|
|
ProcessAuthorizeResponse ( string responseData ) : |
||
RefreshToken ( string refreshToken ) : Task |
||
RemoteAuthenticationClient ( string clientId, string clientSecret, string appId ) : JeffWilcox.Utilities.Silverlight |
|
Method | Description | |
---|---|---|
CalculateHash ( string clientId, string clientSecret, string nonce, string path ) : string |
Calculate hash for token request
|
|
GetNonce ( string r ) : string |
public BuildAuthorizeUri ( string state, string deviceId, string deviceName = null, string responseType = "code" ) : |
||
state | string | Provides any state that might be useful to your application upon receipt of the response. The Hue Authorization Server roundtrips this parameter, so your application receives the same value it sent. To mitigate against cross-site request forgery (CSRF), it is strongly recommended to include an anti-forgery token in the state, and confirm it in the response. One good choice for a state token is a string of 30 or so characters constructed using a high-quality random-number generator. |
deviceId | string | The device identifier must be a unique identifier for the app or device accessing the Hue Remote API. |
deviceName | string | The device name should be the name of the app or device accessing the remote API. The devicename is used in the user's "My Apps" overview in the Hue Account (visualized as: " |
responseType | string | The response_type value must be "code". |
return |
public GetToken ( string code ) : Task |
||
code | string | Code retreived using ProcessAuthorizeResponse |
return | Task |
public ProcessAuthorizeResponse ( string responseData ) : |
||
responseData | string | |
return |
public RefreshToken ( string refreshToken ) : Task |
||
refreshToken | string | |
return | Task |
public RemoteAuthenticationClient ( string clientId, string clientSecret, string appId ) : JeffWilcox.Utilities.Silverlight | ||
clientId | string | Identifies the client that is making the request. The value passed in this parameter must exactly match the value you receive from hue. Note that the underscore is not used in the clientid name of this parameter. |
clientSecret | string | The clientsecret you have received from Hue when registering for the Hue Remote API. |
appId | string | Identifies the app that is making the request. The value passed in this parameter must exactly match the value you receive from hue. |
return | JeffWilcox.Utilities.Silverlight |