|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.junit.Assert
org.apache.shindig.common.EasyMockTestCase
org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests
org.apache.shindig.social.core.oauth.OAuth2AuthCodeFlowTest
public class OAuth2AuthCodeFlowTest
| Field Summary | |
|---|---|
protected static java.lang.String |
CONF_AUTH_CODE
|
protected static java.lang.String |
CONF_CLIENT_ID
|
protected static java.lang.String |
CONF_CLIENT_SECRET
|
protected static java.lang.String |
PUBLIC_AUTH_CODE
|
protected static java.lang.String |
PUBLIC_CLIENT_ID
|
protected static java.lang.String |
PUBLIC_REDIRECT_URI
|
protected static java.lang.String |
REDIRECT_URI
|
protected org.apache.shindig.social.core.oauth2.OAuth2Servlet |
servlet
|
protected static java.lang.String |
SIMPLE_ACCESS_TOKEN
|
| Fields inherited from class org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests |
|---|
injector, XMLSCHEMA, xp, XSDRESOURCE |
| Constructor Summary | |
|---|---|
OAuth2AuthCodeFlowTest()
|
|
| Method Summary | |
|---|---|
void |
abstractLargeRestfulBefore()
|
void |
testConfidentialAuthCodeFlow()
Test retrieving an auth code and using it to generate an access token |
void |
testGetAccessToken()
Test retrieving an access token using a public client |
void |
testGetAccessTokenBadAuthCode()
Test attempting to get an access token with an invalid authorization code |
void |
testGetAccessTokenBadClient()
Test attempting to get an access token with an unregistered client ID |
void |
testGetAccessTokenBadConfidentialClientParams()
Test attempting to get an access token using a bad client secret with a confidential client. |
void |
testGetAccessTokenBadGrantType()
Test attempting to get an access token with a bad grant type |
void |
testGetAccessTokenConfClientBasicAuthBadID()
Incorrect client ID used in Basic Authorization header |
void |
testGetAccessTokenConfidentialClientBasicAuth()
Test using basic authentication scheme for client authentication |
void |
testGetAccessTokenConfidentialClientParams()
Test using URL parameter to pass client secret to authenticate client |
void |
testGetAuthorizationCode()
Test retrieving an authorization code using a public client |
void |
testGetAuthorizationCodeBadRedirect()
Test retrieving an authorization code using a confidential client with a bad redirect URI The redirect URI is registered with this client, so passing a redirect that doesn't match the registered value should generate an error per the OAuth 2.0 spec. |
void |
testGetAuthorizationCodeConfidential()
Test retrieving an authorization code using a confidential client Client authentication is not required for confidential clients accessing the authorization endpoint |
void |
testGetAuthorizationCodeNoRedirect()
Test retrieving an authorization code using a confidential client without setting redirect URI The redirect URI is registered with this client, so omitting it should still generate a response using the registered redirect URI. |
void |
testGetAuthorizationCodePreserveState()
Test retrieving an authorization code using a public client that preserves state |
void |
testReuseAuthorizationCode()
Test attempting to re-use an authorization code to get a new access token. |
| Methods inherited from class org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests |
|---|
childNodesToMap, childNodesToMapofMap, childNodesToNodeMap, getJson, getResponse, getResponse, getResponse, getResponse, getResponse, getServlet, parseXmlContent, setResponse, setServlet |
| Methods inherited from class org.apache.shindig.common.EasyMockTestCase |
|---|
mock, mock, mock, mock, replay, replay, reset, reset, verify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String SIMPLE_ACCESS_TOKEN
protected static final java.lang.String PUBLIC_CLIENT_ID
protected static final java.lang.String PUBLIC_AUTH_CODE
protected static final java.lang.String CONF_CLIENT_ID
protected static final java.lang.String CONF_CLIENT_SECRET
protected static final java.lang.String CONF_AUTH_CODE
protected static final java.lang.String PUBLIC_REDIRECT_URI
protected static final java.lang.String REDIRECT_URI
protected org.apache.shindig.social.core.oauth2.OAuth2Servlet servlet
| Constructor Detail |
|---|
public OAuth2AuthCodeFlowTest()
| Method Detail |
|---|
public void abstractLargeRestfulBefore()
throws java.lang.Exception
abstractLargeRestfulBefore in class AbstractLargeRestfulTestsjava.lang.Exception
public void testGetAccessToken()
throws java.lang.Exception
java.lang.Exception
public void testGetAuthorizationCode()
throws java.lang.Exception
java.lang.Exception
public void testGetAuthorizationCodePreserveState()
throws java.lang.Exception
java.lang.Exception
public void testGetAuthorizationCodeConfidential()
throws java.lang.Exception
java.lang.Exception
public void testGetAuthorizationCodeNoRedirect()
throws java.lang.Exception
java.lang.Exception
public void testGetAuthorizationCodeBadRedirect()
throws java.lang.Exception
java.lang.Exception
public void testConfidentialAuthCodeFlow()
throws java.lang.Exception
java.lang.Exception
public void testGetAccessTokenConfidentialClientParams()
throws java.lang.Exception
java.lang.Exception
public void testGetAccessTokenConfidentialClientBasicAuth()
throws java.lang.Exception
java.lang.Exception
public void testGetAccessTokenConfClientBasicAuthBadID()
throws java.lang.Exception
java.lang.Exception
public void testGetAccessTokenBadConfidentialClientParams()
throws java.lang.Exception
java.lang.Exception
public void testGetAccessTokenBadClient()
throws java.lang.Exception
java.lang.Exception
public void testGetAccessTokenBadGrantType()
throws java.lang.Exception
java.lang.Exception
public void testGetAccessTokenBadAuthCode()
throws java.lang.Exception
java.lang.Exception
public void testReuseAuthorizationCode()
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||