Метод | Описание | |
---|---|---|
ExtractAuthorizationResult ( string authorizationResponseURL ) : Api.OAuth.AuthorizationResult |
Extract AuthorizationResult from the authorization response URL (i.e. the RedirectURL with the response parameters from Smartsheet OAuth server). Exceptions: - IllegalArgumentException : if authorizationResponseURL is null/empty, or a malformed URL - AccessDeniedException : if the user has denied the authorization request - UnsupportedResponseTypeException : if the response Type isn't supported (note that this won't really happen in current implementation) - InvalidScopeException : if some of the specified scopes are invalid - OAuthAuthorizationCodeException : if any other error occurred during the operation
|
|
NewAuthorizationURL ( IEnumerable |
Generate a new authorization URL. Exceptions: - IllegalArgumentException : if scopes is null/empty
|
|
OAuthFlowImpl ( string clientId, string clientSecret, string redirectURL, string authorizationURL, string tokenURL, Api.Internal.Http.HttpClient httpClient, Api.Internal.Json.JsonSerializer jsonSerializer ) : System |
Constructor. Exceptions: -
|
|
ObtainNewToken ( Api.OAuth.AuthorizationResult authorizationResult ) : Api.OAuth.Token |
Obtain a new token using AuthorizationResult. Exceptions: - IllegalArgumentException : if authorizationResult is null - InvalidTokenRequestException : if the token request is invalid (note that this won't really happen in current implementation) - InvalidOAuthClientException : if the client information is invalid - InvalidOAuthGrantException : if the authorization Code or refresh token is invalid or expired, the redirect_uri does not match, or the hash Value does not match the client secret and/or Code - UnsupportedOAuthGrantTypeException : if the grant Type is invalid (note that this won't really happen in current implementation) - OAuthTokenException : if any other error occurred during the operation
|
|
RefreshToken ( Api.OAuth.Token token ) : Api.OAuth.Token |
Refresh token. Exceptions: - IllegalArgumentException : if token is null. - InvalidTokenRequestException : if the token request is invalid - InvalidOAuthClientException : if the client information is invalid - InvalidOAuthGrantException : if the authorization Code or refresh token is invalid or expired, the redirect_uri does not match, or the hash Value does not match the client secret and/or Code - UnsupportedOAuthGrantTypeException : if the grant Type is invalid - OAuthTokenException : if any other error occurred during the operation
|
|
RevokeToken ( Api.OAuth.Token token ) : void |
Revoke token.
|
Метод | Описание | |
---|---|---|
GenerateURL ( string baseURL, string>.IDictionary |
Helper function To generate a URL using the base URL and the given parameters. It will encode each of the parameters as well.
|
Метод | Описание | |
---|---|---|
RequestToken ( string url ) : Api.OAuth.Token |
Request a token. Exceptions: - IllegalArgumentException : if Url is null or empty - InvalidTokenRequestException : if the token request is invalid - InvalidOAuthClientException : if the client information is invalid - InvalidOAuthGrantException : if the authorization Code or refresh token is invalid or expired, the redirect_uri does not match, or the hash Value does not match the client secret and/or Code - UnsupportedOAuthGrantTypeException : if the grant Type is invalid - OAuthTokenException : if any other error occurred during the operation
|
|
getHash ( string str ) : string |
public ExtractAuthorizationResult ( string authorizationResponseURL ) : Api.OAuth.AuthorizationResult | ||
authorizationResponseURL | string | the authorization response URL |
Результат | Api.OAuth.AuthorizationResult |
protected GenerateURL ( string baseURL, string>.IDictionary |
||
baseURL | string | The base URL that the parameters will be appended To. |
parameters | string>.IDictionary | The parameters that will be appended To the base URL. Each parameter will be URL encoded. |
Результат | string |
public NewAuthorizationURL ( IEnumerable |
||
scopes | IEnumerable |
the scopes |
state | string | an arbitrary string that will be returned To your app; intended To be used by you To ensure that /// this redirect is indeed from an OAuth flow that you initiated |
Результат | string |
public OAuthFlowImpl ( string clientId, string clientSecret, string redirectURL, string authorizationURL, string tokenURL, Api.Internal.Http.HttpClient httpClient, Api.Internal.Json.JsonSerializer jsonSerializer ) : System | ||
clientId | string | the client Id |
clientSecret | string | the client secret |
redirectURL | string | the redirect Url |
authorizationURL | string | the authorization Url |
tokenURL | string | the token Url |
httpClient | Api.Internal.Http.HttpClient | the http client |
jsonSerializer | Api.Internal.Json.JsonSerializer | the Json serializer |
Результат | System |
public ObtainNewToken ( Api.OAuth.AuthorizationResult authorizationResult ) : Api.OAuth.Token | ||
authorizationResult | Api.OAuth.AuthorizationResult | the authorization RequestResult |
Результат | Api.OAuth.Token |
public RefreshToken ( Api.OAuth.Token token ) : Api.OAuth.Token | ||
token | Api.OAuth.Token | the token To refresh |
Результат | Api.OAuth.Token |
public RevokeToken ( Api.OAuth.Token token ) : void | ||
token | Api.OAuth.Token | the token |
Результат | void |