org.codegist.crest.security
Interface Authorization

All Known Implementing Classes:
BasicAuthorization, OAuthorization

public interface Authorization

Author:
laurent.gilles@codegist.org

Method Summary
 AuthorizationToken authorize(MethodType methodType, String url, EncodedPair... parameters)
          Generates an authorization token for a given request
 void refresh()
          Refreshes internal state when the application has detected authorization credential expiration
 

Method Detail

authorize

AuthorizationToken authorize(MethodType methodType,
                             String url,
                             EncodedPair... parameters)
                             throws Exception
Generates an authorization token for a given request

Parameters:
methodType - request method type
url - request url
parameters - request parameter to sign
Returns:
the request authorization token
Throws:
Exception - Any exception thrown during authorization token generation

refresh

void refresh()
             throws Exception
Refreshes internal state when the application has detected authorization credential expiration

Throws:
Exception - Any exception thrown during credential renewal


Copyright © 2011. All Rights Reserved.