Implementation of the OAuth with RSA-SHA1 (tested with Atlassian JIRA) authorization hook. Plugin's info Map returned by the pluginInfo() method should contain section:
oauth : [
// boolean. If set to true, OAuth parameters will be sent in 'Authorization: OAuth ...' header instead of the query parameters
headerAuthorization : ...,
oauth_signature_method: 'RSA-SHA1',
oauth_version : '1.0',
// This assumes you will request the token by yourself, not used
request_method : '...', // e.g. POST, GET
request_token_path : '...',
authorize_token_path : '...',
access_token_path : '...',
]
| Type | Name and description |
|---|---|
java.util.Map |
oauthParams |
RESTConfig |
restConfig |
| Constructor and description |
|---|
RSAOAuthRequestHook
(RESTConfig restConfig)Constructor |
| Type Params | Return Type | Name and description |
|---|---|---|
|
HTTPRequest |
call(HTTPRequest hr)Main method that uses net.oauth libraries to sign the request |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor
restConfiguration - Map with 'oauth' (whole third-party specific properties) and 'auth' (concrete case) maps.Main method that uses net.oauth libraries to sign the request
hr - HTTPRequest that is ready to be processedGroovy Documentation