com.dyuproject.oauth
Interface TokenManager

All Known Implementing Classes:
CookieBasedTokenManager, HttpSessionTokenManager

public interface TokenManager

Manages the token; Provides the ability to get, save or invalidate the token.

Author:
David Yu
Date created:
Jun 2, 2009

Method Summary
 Token getToken(String consumerKey, HttpServletRequest request)
          Gets the token.
 void init(Properties properties)
          Initialize this manager based from the given properties.
 boolean invalidate(String consumerKey, HttpServletRequest request, HttpServletResponse response)
          Invalidates the token.
 boolean saveToken(Token token, HttpServletRequest request, HttpServletResponse response)
          Saves the token.
 

Method Detail

init

void init(Properties properties)
Initialize this manager based from the given properties.


getToken

Token getToken(String consumerKey,
               HttpServletRequest request)
               throws IOException
Gets the token.

Throws:
IOException

saveToken

boolean saveToken(Token token,
                  HttpServletRequest request,
                  HttpServletResponse response)
                  throws IOException
Saves the token.

Throws:
IOException

invalidate

boolean invalidate(String consumerKey,
                   HttpServletRequest request,
                   HttpServletResponse response)
                   throws IOException
Invalidates the token.

Throws:
IOException


Copyright © 2008-2013. All Rights Reserved.