gluu
公開メンバ関数 | 静的公開メンバ関数 | 静的公開変数類 | 限定公開変数類 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest クラス
org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest の継承関係図
Inheritance graph
org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest 連携図
Collaboration graph

公開メンバ関数

void omittedResponseTypesStep1 (final String registerPath, final String redirectUris) throws Exception
 
void omittedResponseTypesStep2 (final String registerPath) throws Exception
 
void omittedResponseTypesStep3a (final String authorizePath, final String userId, final String userSecret, final String redirectUri) throws Exception
 
void omittedResponseTypesStep3b (final String tokenPath, final String redirectUri) throws Exception
 
Object [][] omittedResponseTypesStep4DataProvider (ITestContext context)
 
void omittedResponseTypesStep4 (final String authorizePath, final String userId, final String userSecret, final String redirectUri, final List< ResponseType > responseTypes) throws Exception
 
void responseTypesCodeIdTokenStep1 (final String registerPath, final String redirectUris) throws Exception
 
void responseTypesCodeIdTokenStep2 (final String registerPath) throws Exception
 
void responseTypesCodeIdTokenStep3a (final String authorizePath, final String userId, final String userSecret, final String redirectUri) throws Exception
 
void responseTypesCodeIdTokenStep3b (final String tokenPath, final String redirectUri) throws Exception
 
Object [][] responseTypesCodeIdTokenStep4DataProvider (ITestContext context)
 
void responseTypesCodeIdTokenStep4 (final String authorizePath, final String userId, final String userSecret, final String redirectUri, final List< ResponseType > responseTypes) throws Exception
 
void responseTypesTokenIdTokenStep1 (final String registerPath, final String redirectUris) throws Exception
 
void responseTypesTokenIdTokenStep2 (final String registerPath) throws Exception
 
void responseTypesTokenIdTokenStep3 (final String authorizePath, final String userId, final String userSecret, final String redirectUri) throws Exception
 
Object [][] responseTypesTokenIdTokenStep4DataProvider (ITestContext context)
 
void responseTypesTokenIdTokenStep4 (final String authorizePath, final String userId, final String userSecret, final String redirectUri, final List< ResponseType > responseTypes) throws Exception
 
void initTestSuite (ITestContext context) throws FileNotFoundException, IOException
 
WebDriver getDriver ()
 
void setDriver (WebDriver driver)
 
String getAuthorizationEndpoint ()
 
void setAuthorizationEndpoint (String authorizationEndpoint)
 
String getTokenEndpoint ()
 
void setTokenEndpoint (String tokenEndpoint)
 
String getUserInfoEndpoint ()
 
void setUserInfoEndpoint (String userInfoEndpoint)
 
String getClientInfoEndpoint ()
 
void setClientInfoEndpoint (String clientInfoEndpoint)
 
String getCheckSessionIFrame ()
 
void setCheckSessionIFrame (String checkSessionIFrame)
 
String getEndSessionEndpoint ()
 
void setEndSessionEndpoint (String endSessionEndpoint)
 
String getJwksUri ()
 
void setJwksUri (String jwksUri)
 
String getRegistrationEndpoint ()
 
void setRegistrationEndpoint (String registrationEndpoint)
 
String getIntrospectionEndpoint ()
 
void setIntrospectionEndpoint (String p_introspectionEndpoint)
 
Map< String, List< String > > getScopeToClaimsMapping ()
 
void setScopeToClaimsMapping (Map< String, List< String >> p_scopeToClaimsMapping)
 
String getIdGenEndpoint ()
 
void setIdGenEndpoint (String p_idGenEndpoint)
 
String getConfigurationEndpoint ()
 
void setConfigurationEndpoint (String configurationEndpoint)
 
void startSelenium ()
 
void stopSelenium ()
 
AuthorizationResponse authenticateResourceOwnerAndGrantAccess (String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret)
 
AuthorizationResponse authenticateResourceOwnerAndGrantAccess (String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret, boolean cleanupCookies)
 
AuthorizationResponse authenticateResourceOwnerAndGrantAccess (String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret, boolean cleanupCookies, boolean useNewDriver)
 
AuthorizationResponse authenticateResourceOwnerAndGrantAccess (String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret, boolean cleanupCookies, boolean useNewDriver, int authzSteps)
 
AuthorizationResponse authenticateResourceOwnerAndDenyAccess (String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret)
 
AuthorizationResponse authorizationRequestAndGrantAccess (String authorizeUrl, AuthorizationRequest authorizationRequest)
 
AuthorizationResponse authorizationRequestAndDenyAccess (String authorizeUrl, AuthorizationRequest authorizationRequest)
 
AuthorizationResponse authenticateResourceOwner (String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret, boolean cleanupCookies)
 
String waitForResourceOwnerAndGrantLoginForm (String authorizeUrl, AuthorizationRequest authorizationRequest, boolean cleanupCookies)
 
String waitForResourceOwnerAndGrantLoginForm (String authorizeUrl, AuthorizationRequest authorizationRequest)
 
void discovery (ITestContext context) throws Exception
 
void showTitle (String title)
 
void showTitle (String title)
 
void showEntity (String entity)
 
void showResponse (String title, Response response)
 

静的公開メンバ関数

static void showClient (BaseClient client)
 
static void showClient (BaseClient client, CookieStore cookieStore)
 
static void showClientUserAgent (BaseClient client)
 
static void assertErrorResponse (BaseResponseWithErrors p_response, IErrorType p_errorType)
 
static DefaultHttpClient createHttpClient ()
 
static DefaultHttpClient createHttpClient (HostnameVerifierType p_verifierType)
 
static ClientExecutor clientExecutor () throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
 
static ClientExecutor clientExecutor (boolean trustAll) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
 
static HttpClient createHttpClientTrustAll () throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
 
static void showResponse (String title, Response response, Object entity)
 
static void fails (Throwable e)
 
static void output (String p_msg)
 
static Archive<?> createDeployment ()
 

静的公開変数類

static FileConfiguration testData
 

限定公開変数類

WebDriver driver
 
String authorizationEndpoint
 
String authorizationPageEndpoint
 
String gluuConfigurationEndpoint
 
String tokenEndpoint
 
String userInfoEndpoint
 
String clientInfoEndpoint
 
String checkSessionIFrame
 
String endSessionEndpoint
 
String jwksUri
 
String registrationEndpoint
 
String configurationEndpoint
 
String idGenEndpoint
 
String introspectionEndpoint
 
Map< String, List< String > > scopeToClaimsMapping
 

非公開変数類

URI url
 

静的非公開変数類

static String clientId1
 
static String clientSecret1
 
static String registrationAccessToken1
 
static String registrationClientUri1
 
static String authorizationCode1
 
static String clientId2
 
static String clientSecret2
 
static String registrationAccessToken2
 
static String registrationClientUri2
 
static String authorizationCode2
 
static String clientId3
 
static String registrationAccessToken3
 
static String registrationClientUri3
 

詳解

著者
Javier Rojas Blum
バージョン
November 29, 2017

関数詳解

◆ assertErrorResponse()

static void org.xdi.oxauth.BaseTest.assertErrorResponse ( BaseResponseWithErrors  p_response,
IErrorType  p_errorType 
)
inlinestaticinherited
787  {
788  assertEquals(p_response.getStatus(), 400, "Unexpected response code. Entity: " + p_response.getEntity());
789  assertNotNull(p_response.getEntity(), "The entity is null");
790  assertEquals(p_response.getErrorType(), p_errorType);
791  assertTrue(StringUtils.isNotBlank(p_response.getErrorDescription()));
792  }
T getErrorType()
Definition: BaseResponseWithErrors.java:48
String getEntity()
Definition: BaseResponse.java:85
int getStatus()
Definition: BaseResponse.java:49
String getErrorDescription()
Definition: BaseResponseWithErrors.java:40

◆ authenticateResourceOwner()

AuthorizationResponse org.xdi.oxauth.BaseTest.authenticateResourceOwner ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest,
String  userId,
String  userSecret,
boolean  cleanupCookies 
)
inlineinherited

The authorization server authenticates the resource owner (via the user-agent) No authorization page.

556  {
557  String authorizationRequestUrl = authorizeUrl + "?" + authorizationRequest.getQueryString();
558 
559  AuthorizeClient authorizeClient = new AuthorizeClient(authorizeUrl);
560  authorizeClient.setRequest(authorizationRequest);
561 
562  System.out.println("authenticateResourceOwner: authorizationRequestUrl:" + authorizationRequestUrl);
563  startSelenium();
564  if (cleanupCookies) {
565  System.out.println("authenticateResourceOwner: Cleaning cookies");
567  }
568 // try {
569  driver.navigate().to(authorizationRequestUrl);
570 // } catch (WebDriverException ex) {
571 // if (ex.getCause() instanceof ScriptException) {
572 // System.out.println("authenticateResourceOwner: Script error: " + ex.getMessage());
573 // } else {
574 // throw ex;
575 // }
576 // }
577 
578  if (userSecret != null) {
579  if (userId != null) {
580  WebElement usernameElement = driver.findElement(By.name(loginFormUsername));
581  usernameElement.sendKeys(userId);
582  }
583 
584  WebElement passwordElement = driver.findElement(By.name(loginFormPassword));
585  passwordElement.sendKeys(userSecret);
586 
587  WebElement loginButton = driver.findElement(By.name(loginFormLoginButton));
588 
589  loginButton.click();
590  }
591 
592  String authorizationResponseStr = driver.getCurrentUrl();
593 
594  Cookie sessionStateCookie = driver.manage().getCookieNamed("session_state");
595  String sessionState = null;
596  if (sessionStateCookie != null) {
597  sessionState = sessionStateCookie.getValue();
598  }
599  System.out.println("authenticateResourceOwner: sessionState:" + sessionState);
600 
601  stopSelenium();
602 
603  AuthorizationResponse authorizationResponse = new AuthorizationResponse(authorizationResponseStr);
604  if (authorizationRequest.getRedirectUri() != null && authorizationRequest.getRedirectUri().equals(authorizationResponseStr)) {
605  authorizationResponse.setResponseMode(ResponseMode.FORM_POST);
606  }
607  authorizeClient.setResponse(authorizationResponse);
608  showClientUserAgent(authorizeClient);
609 
610  return authorizationResponse;
611  }
FORM_POST
Definition: ResponseMode.java:33
String loginFormUsername
Definition: BaseTest.java:88
String loginFormPassword
Definition: BaseTest.java:89
void deleteAllCookies()
Definition: BaseTest.java:661
void stopSelenium()
Definition: BaseTest.java:243
Definition: AuthorizeClient.java:29
Definition: ResponseMode.java:16
void startSelenium()
Definition: BaseTest.java:230
String loginFormLoginButton
Definition: BaseTest.java:90
String getRedirectUri()
Definition: AuthorizationRequest.java:184
void setResponseMode(ResponseMode responseMode)
Definition: AuthorizationResponse.java:228
void setRequest(T request)
Definition: BaseClient.java:68
void setResponse(V response)
Definition: BaseClient.java:76
WebDriver driver
Definition: BaseTest.java:70
Definition: AuthorizationResponse.java:32
String getQueryString()
Definition: AuthorizationRequest.java:486
static void showClientUserAgent(BaseClient client)
Definition: BaseTest.java:783

◆ authenticateResourceOwnerAndDenyAccess()

AuthorizationResponse org.xdi.oxauth.BaseTest.authenticateResourceOwnerAndDenyAccess ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest,
String  userId,
String  userSecret 
)
inlineinherited
408  {
409  String authorizationRequestUrl = authorizeUrl + "?" + authorizationRequest.getQueryString();
410 
411  AuthorizeClient authorizeClient = new AuthorizeClient(authorizeUrl);
412  authorizeClient.setRequest(authorizationRequest);
413 
414  System.out.println("authenticateResourceOwnerAndDenyAccess: authorizationRequestUrl:" + authorizationRequestUrl);
415  startSelenium();
416  driver.navigate().to(authorizationRequestUrl);
417 
418  WebElement usernameElement = driver.findElement(By.name(loginFormUsername));
419  WebElement passwordElement = driver.findElement(By.name(loginFormPassword));
420  WebElement loginButton = driver.findElement(By.name(loginFormLoginButton));
421 
422  if (userId != null) {
423  usernameElement.sendKeys(userId);
424  }
425  passwordElement.sendKeys(userSecret);
426  loginButton.click();
427 
428  String authorizationResponseStr = driver.getCurrentUrl();
429 
430  WebElement doNotAllowButton = driver.findElement(By.id(authorizeFormDoNotAllowButton));
431 
432  final String previousURL = driver.getCurrentUrl();
433  doNotAllowButton.click();
434  WebDriverWait wait = new WebDriverWait(driver, 10);
435  wait.until(new ExpectedCondition<Boolean>() {
436  public Boolean apply(WebDriver d) {
437  return (d.getCurrentUrl() != previousURL);
438  }
439  });
440 
441  authorizationResponseStr = driver.getCurrentUrl();
442 
443  Cookie sessionIdCookie = driver.manage().getCookieNamed("session_id");
444  String sessionId = null;
445  if (sessionIdCookie != null) {
446  sessionId = sessionIdCookie.getValue();
447  }
448  System.out.println("authenticateResourceOwnerAndDenyAccess: sessionId:" + sessionId);
449 
450  stopSelenium();
451 
452  AuthorizationResponse authorizationResponse = new AuthorizationResponse(authorizationResponseStr);
453  if (authorizationRequest.getRedirectUri() != null && authorizationRequest.getRedirectUri().equals(authorizationResponseStr)) {
454  authorizationResponse.setResponseMode(ResponseMode.FORM_POST);
455  }
456  authorizationResponse.setSessionId(sessionId);
457  authorizeClient.setResponse(authorizationResponse);
458  showClientUserAgent(authorizeClient);
459 
460  return authorizationResponse;
461  }
FORM_POST
Definition: ResponseMode.java:33
String loginFormUsername
Definition: BaseTest.java:88
String loginFormPassword
Definition: BaseTest.java:89
void stopSelenium()
Definition: BaseTest.java:243
String authorizeFormDoNotAllowButton
Definition: BaseTest.java:92
void setSessionId(String p_sessionId)
Definition: AuthorizationResponse.java:212
Definition: AuthorizeClient.java:29
Definition: ResponseMode.java:16
void startSelenium()
Definition: BaseTest.java:230
String loginFormLoginButton
Definition: BaseTest.java:90
String getRedirectUri()
Definition: AuthorizationRequest.java:184
void setResponseMode(ResponseMode responseMode)
Definition: AuthorizationResponse.java:228
void setRequest(T request)
Definition: BaseClient.java:68
void setResponse(V response)
Definition: BaseClient.java:76
WebDriver driver
Definition: BaseTest.java:70
Definition: AuthorizationResponse.java:32
String getQueryString()
Definition: AuthorizationRequest.java:486
static void showClientUserAgent(BaseClient client)
Definition: BaseTest.java:783

◆ authenticateResourceOwnerAndGrantAccess() [1/4]

AuthorizationResponse org.xdi.oxauth.BaseTest.authenticateResourceOwnerAndGrantAccess ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest,
String  userId,
String  userSecret 
)
inlineinherited

The authorization server authenticates the resource owner (via the user-agent) and establishes whether the resource owner grants or denies the client's access request.

253  {
254  return authenticateResourceOwnerAndGrantAccess(authorizeUrl, authorizationRequest, userId, userSecret, true);
255  }
AuthorizationResponse authenticateResourceOwnerAndGrantAccess(String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret)
Definition: BaseTest.java:252

◆ authenticateResourceOwnerAndGrantAccess() [2/4]

AuthorizationResponse org.xdi.oxauth.BaseTest.authenticateResourceOwnerAndGrantAccess ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest,
String  userId,
String  userSecret,
boolean  cleanupCookies 
)
inlineinherited

The authorization server authenticates the resource owner (via the user-agent) and establishes whether the resource owner grants or denies the client's access request.

262  {
263  return authenticateResourceOwnerAndGrantAccess(authorizeUrl, authorizationRequest, userId, userSecret, cleanupCookies, false);
264  }
AuthorizationResponse authenticateResourceOwnerAndGrantAccess(String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret)
Definition: BaseTest.java:252

◆ authenticateResourceOwnerAndGrantAccess() [3/4]

AuthorizationResponse org.xdi.oxauth.BaseTest.authenticateResourceOwnerAndGrantAccess ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest,
String  userId,
String  userSecret,
boolean  cleanupCookies,
boolean  useNewDriver 
)
inlineinherited

The authorization server authenticates the resource owner (via the user-agent) and establishes whether the resource owner grants or denies the client's access request.

272  {
273  return authenticateResourceOwnerAndGrantAccess(authorizeUrl, authorizationRequest, userId, userSecret, cleanupCookies, useNewDriver, 1);
274  }
AuthorizationResponse authenticateResourceOwnerAndGrantAccess(String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret)
Definition: BaseTest.java:252

◆ authenticateResourceOwnerAndGrantAccess() [4/4]

AuthorizationResponse org.xdi.oxauth.BaseTest.authenticateResourceOwnerAndGrantAccess ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest,
String  userId,
String  userSecret,
boolean  cleanupCookies,
boolean  useNewDriver,
int  authzSteps 
)
inlineinherited

The authorization server authenticates the resource owner (via the user-agent) and establishes whether the resource owner grants or denies the client's access request.

282  {
283  WebDriver currentDriver = initWebDriver(useNewDriver, cleanupCookies);
284 
285  AuthorizeClient authorizeClient = processAuthentication(currentDriver, authorizeUrl, authorizationRequest,
286  userId, userSecret);
287 
288  int remainAuthzSteps = authzSteps;
289 
290  String authorizationResponseStr = null;
291  do {
292  authorizationResponseStr = acceptAuthorization(currentDriver);
293  remainAuthzSteps--;
294  } while (remainAuthzSteps >= 1);
295 
296  AuthorizationResponse authorizationResponse = buildAuthorizationResponse(authorizationRequest, useNewDriver,
297  currentDriver, authorizeClient, authorizationResponseStr);
298 
299  stopWebDriver(useNewDriver, currentDriver);
300 
301  return authorizationResponse;
302  }
AuthorizationResponse buildAuthorizationResponse(AuthorizationRequest authorizationRequest, boolean useNewDriver, WebDriver currentDriver, AuthorizeClient authorizeClient, String authorizationResponseStr)
Definition: BaseTest.java:387
String acceptAuthorization(WebDriver currentDriver)
Definition: BaseTest.java:358
AuthorizeClient processAuthentication(WebDriver currentDriver, String authorizeUrl, AuthorizationRequest authorizationRequest, String userId, String userSecret)
Definition: BaseTest.java:330
Definition: AuthorizeClient.java:29
WebDriver initWebDriver(boolean useNewDriver, boolean cleanupCookies)
Definition: BaseTest.java:304
Definition: AuthorizationResponse.java:32
void stopWebDriver(boolean useNewDriver, WebDriver currentDriver)
Definition: BaseTest.java:321

◆ authorizationRequestAndDenyAccess()

AuthorizationResponse org.xdi.oxauth.BaseTest.authorizationRequestAndDenyAccess ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest 
)
inlineinherited
509  {
510  String authorizationRequestUrl = authorizeUrl + "?" + authorizationRequest.getQueryString();
511 
512  AuthorizeClient authorizeClient = new AuthorizeClient(authorizeUrl);
513  authorizeClient.setRequest(authorizationRequest);
514 
515  System.out.println("authorizationRequestAndDenyAccess: authorizationRequestUrl:" + authorizationRequestUrl);
516  startSelenium();
517  driver.navigate().to(authorizationRequestUrl);
518 
519  WebElement doNotAllowButton = driver.findElement(By.id(authorizeFormDoNotAllowButton));
520 
521  final String previousURL = driver.getCurrentUrl();
522  doNotAllowButton.click();
523  WebDriverWait wait = new WebDriverWait(driver, 10);
524  wait.until(new ExpectedCondition<Boolean>() {
525  public Boolean apply(WebDriver d) {
526  return (d.getCurrentUrl() != previousURL);
527  }
528  });
529 
530  String authorizationResponseStr = driver.getCurrentUrl();
531 
532  Cookie sessionStateCookie = driver.manage().getCookieNamed("session_state");
533  String sessionState = null;
534  if (sessionStateCookie != null) {
535  sessionState = sessionStateCookie.getValue();
536  }
537  System.out.println("authorizationRequestAndDenyAccess: sessionState:" + sessionState);
538 
539  stopSelenium();
540 
541  AuthorizationResponse authorizationResponse = new AuthorizationResponse(authorizationResponseStr);
542  if (authorizationRequest.getRedirectUri() != null && authorizationRequest.getRedirectUri().equals(authorizationResponseStr)) {
543  authorizationResponse.setResponseMode(ResponseMode.FORM_POST);
544  }
545  authorizeClient.setResponse(authorizationResponse);
546  showClientUserAgent(authorizeClient);
547 
548  return authorizationResponse;
549  }
FORM_POST
Definition: ResponseMode.java:33
void stopSelenium()
Definition: BaseTest.java:243
String authorizeFormDoNotAllowButton
Definition: BaseTest.java:92
Definition: AuthorizeClient.java:29
Definition: ResponseMode.java:16
void startSelenium()
Definition: BaseTest.java:230
String getRedirectUri()
Definition: AuthorizationRequest.java:184
void setResponseMode(ResponseMode responseMode)
Definition: AuthorizationResponse.java:228
void setRequest(T request)
Definition: BaseClient.java:68
void setResponse(V response)
Definition: BaseClient.java:76
WebDriver driver
Definition: BaseTest.java:70
Definition: AuthorizationResponse.java:32
String getQueryString()
Definition: AuthorizationRequest.java:486
static void showClientUserAgent(BaseClient client)
Definition: BaseTest.java:783

◆ authorizationRequestAndGrantAccess()

AuthorizationResponse org.xdi.oxauth.BaseTest.authorizationRequestAndGrantAccess ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest 
)
inlineinherited
464  {
465  String authorizationRequestUrl = authorizeUrl + "?" + authorizationRequest.getQueryString();
466 
467  AuthorizeClient authorizeClient = new AuthorizeClient(authorizeUrl);
468  authorizeClient.setRequest(authorizationRequest);
469 
470  System.out.println("authorizationRequestAndGrantAccess: authorizationRequestUrl:" + authorizationRequestUrl);
471  startSelenium();
472  driver.navigate().to(authorizationRequestUrl);
473 
474  String authorizationResponseStr = driver.getCurrentUrl();
475 
476  WebElement allowButton = driver.findElement(By.id(authorizeFormAllowButton));
477 
478  final String previousURL = driver.getCurrentUrl();
479  allowButton.click();
480  WebDriverWait wait = new WebDriverWait(driver, 10);
481  wait.until(new ExpectedCondition<Boolean>() {
482  public Boolean apply(WebDriver d) {
483  return (d.getCurrentUrl() != previousURL);
484  }
485  });
486 
487  authorizationResponseStr = driver.getCurrentUrl();
488 
489  Cookie sessionStateCookie = driver.manage().getCookieNamed("session_state");
490  String sessionState = null;
491  if (sessionStateCookie != null) {
492  sessionState = sessionStateCookie.getValue();
493  }
494  System.out.println("authorizationRequestAndGrantAccess: sessionState:" + sessionState);
495 
496  stopSelenium();
497 
498  AuthorizationResponse authorizationResponse = new AuthorizationResponse(authorizationResponseStr);
499  if (authorizationRequest.getRedirectUri() != null && authorizationRequest.getRedirectUri().equals(authorizationResponseStr)) {
500  authorizationResponse.setResponseMode(ResponseMode.FORM_POST);
501  }
502  authorizeClient.setResponse(authorizationResponse);
503  showClientUserAgent(authorizeClient);
504 
505  return authorizationResponse;
506  }
FORM_POST
Definition: ResponseMode.java:33
void stopSelenium()
Definition: BaseTest.java:243
Definition: AuthorizeClient.java:29
Definition: ResponseMode.java:16
void startSelenium()
Definition: BaseTest.java:230
String getRedirectUri()
Definition: AuthorizationRequest.java:184
void setResponseMode(ResponseMode responseMode)
Definition: AuthorizationResponse.java:228
void setRequest(T request)
Definition: BaseClient.java:68
void setResponse(V response)
Definition: BaseClient.java:76
WebDriver driver
Definition: BaseTest.java:70
Definition: AuthorizationResponse.java:32
String getQueryString()
Definition: AuthorizationRequest.java:486
static void showClientUserAgent(BaseClient client)
Definition: BaseTest.java:783
String authorizeFormAllowButton
Definition: BaseTest.java:91

◆ clientExecutor() [1/2]

static ClientExecutor org.xdi.oxauth.BaseTest.clientExecutor ( ) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
inlinestaticinherited
822  {
823  return clientExecutor(false);
824  }
static ClientExecutor clientExecutor()
Definition: BaseTest.java:822

◆ clientExecutor() [2/2]

static ClientExecutor org.xdi.oxauth.BaseTest.clientExecutor ( boolean  trustAll) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
inlinestaticinherited
826  {
827  if (trustAll) {
828  return new ApacheHttpClient4Executor(createHttpClientTrustAll());
829  }
830  return ClientRequest.getDefaultExecutor();
831  }
static HttpClient createHttpClientTrustAll()
Definition: BaseTest.java:833

◆ createDeployment()

static Archive<?> org.xdi.oxauth.ConfigurableTest.createDeployment ( )
inlinestaticinherited
40  {
41  return Deployments.createDeployment();
42  }

◆ createHttpClient() [1/2]

static DefaultHttpClient org.xdi.oxauth.BaseTest.createHttpClient ( )
inlinestaticinherited
794  {
795  return createHttpClient(HostnameVerifierType.DEFAULT);
796  }
static DefaultHttpClient createHttpClient()
Definition: BaseTest.java:794

◆ createHttpClient() [2/2]

static DefaultHttpClient org.xdi.oxauth.BaseTest.createHttpClient ( HostnameVerifierType  p_verifierType)
inlinestaticinherited
798  {
799  if (p_verifierType != null && p_verifierType != HostnameVerifierType.DEFAULT) {
800  switch (p_verifierType) {
801  case ALLOW_ALL:
802  HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;
803 
804  DefaultHttpClient client = new DefaultHttpClient();
805 
806  SchemeRegistry registry = new SchemeRegistry();
807  SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory();
808  socketFactory.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);
809  registry.register(new Scheme("https", socketFactory, 443));
810  SingleClientConnManager mgr = new SingleClientConnManager(client.getParams(), registry);
811 
812  // Set verifier
813  HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);
814  return new DefaultHttpClient(mgr, client.getParams());
815  case DEFAULT:
816  return new DefaultHttpClient();
817  }
818  }
819  return new DefaultHttpClient();
820  }

◆ createHttpClientTrustAll()

static HttpClient org.xdi.oxauth.BaseTest.createHttpClientTrustAll ( ) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException
inlinestaticinherited
833  {
834  SSLSocketFactory sf = new SSLSocketFactory(new TrustStrategy() {
835  @Override
836  public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
837  return true;
838  }
839  }, new AllowAllHostnameVerifier());
840 
841  SchemeRegistry registry = new SchemeRegistry();
842  registry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
843  registry.register(new Scheme("https", 443, sf));
844  ClientConnectionManager ccm = new PoolingClientConnectionManager(registry);
845  return new DefaultHttpClient(ccm);
846  }

◆ discovery()

void org.xdi.oxauth.BaseTest.discovery ( ITestContext  context) throws Exception
inlineinherited
670  {
671  // Load Form Interaction
672  loginFormUsername = context.getCurrentXmlTest().getParameter("loginFormUsername");
673  loginFormPassword = context.getCurrentXmlTest().getParameter("loginFormPassword");
674  loginFormLoginButton = context.getCurrentXmlTest().getParameter("loginFormLoginButton");
675  authorizeFormAllowButton = context.getCurrentXmlTest().getParameter("authorizeFormAllowButton");
676  authorizeFormDoNotAllowButton = context.getCurrentXmlTest().getParameter("authorizeFormDoNotAllowButton");
677 
678  String resource = context.getCurrentXmlTest().getParameter("swdResource");
679 
680  if (StringUtils.isNotBlank(resource)) {
681 
682  showTitle("OpenID Connect Discovery");
683 
684  OpenIdConnectDiscoveryClient openIdConnectDiscoveryClient = new OpenIdConnectDiscoveryClient(resource);
685  OpenIdConnectDiscoveryResponse openIdConnectDiscoveryResponse = openIdConnectDiscoveryClient.exec(clientExecutor(true));
686 
687  showClient(openIdConnectDiscoveryClient);
688  assertEquals(openIdConnectDiscoveryResponse.getStatus(), 200, "Unexpected response code");
689  assertNotNull(openIdConnectDiscoveryResponse.getSubject());
690  assertTrue(openIdConnectDiscoveryResponse.getLinks().size() > 0);
691 
692  configurationEndpoint = openIdConnectDiscoveryResponse.getLinks().get(0).getHref() +
693  "/.well-known/openid-configuration";
694 
695  System.out.println("OpenID Connect Configuration");
696 
697  OpenIdConfigurationClient client = new OpenIdConfigurationClient(configurationEndpoint);
698  client.setExecutor(clientExecutor(true));
700 
701  showClient(client);
702  assertEquals(response.getStatus(), 200, "Unexpected response code");
703  assertNotNull(response.getIssuer(), "The issuer is null");
704  assertNotNull(response.getAuthorizationEndpoint(), "The authorizationEndpoint is null");
705  assertNotNull(response.getTokenEndpoint(), "The tokenEndpoint is null");
706  assertNotNull(response.getUserInfoEndpoint(), "The userInfoEndPoint is null");
707  assertNotNull(response.getJwksUri(), "The jwksUri is null");
708  assertNotNull(response.getRegistrationEndpoint(), "The registrationEndpoint is null");
709 
710  assertTrue(response.getScopesSupported().size() > 0, "The scopesSupported is empty");
711  assertTrue(response.getScopeToClaimsMapping().size() > 0, "The scope to claims mapping is empty");
712  assertTrue(response.getResponseTypesSupported().size() > 0, "The responseTypesSupported is empty");
713  assertTrue(response.getGrantTypesSupported().size() > 0, "The grantTypesSupported is empty");
714  assertTrue(response.getAcrValuesSupported().size() >= 0, "The acrValuesSupported is empty");
715  assertTrue(response.getSubjectTypesSupported().size() > 0, "The subjectTypesSupported is empty");
716  assertTrue(response.getIdTokenSigningAlgValuesSupported().size() > 0, "The idTokenSigningAlgValuesSupported is empty");
717  assertTrue(response.getRequestObjectSigningAlgValuesSupported().size() > 0, "The requestObjectSigningAlgValuesSupported is empty");
718  assertTrue(response.getTokenEndpointAuthMethodsSupported().size() > 0, "The tokenEndpointAuthMethodsSupported is empty");
719  assertTrue(response.getClaimsSupported().size() > 0, "The claimsSupported is empty");
720 
722  tokenEndpoint = response.getTokenEndpoint();
727  jwksUri = response.getJwksUri();
732  gluuConfigurationEndpoint = determineGluuConfigurationEndpoint(openIdConnectDiscoveryResponse.getLinks().get(0).getHref());
733  } else {
734  showTitle("Loading configuration endpoints from properties file");
735 
736  authorizationEndpoint = context.getCurrentXmlTest().getParameter("authorizationEndpoint");
737  tokenEndpoint = context.getCurrentXmlTest().getParameter("tokenEndpoint");
738  userInfoEndpoint = context.getCurrentXmlTest().getParameter("userInfoEndpoint");
739  clientInfoEndpoint = context.getCurrentXmlTest().getParameter("clientInfoEndpoint");
740  checkSessionIFrame = context.getCurrentXmlTest().getParameter("checkSessionIFrame");
741  endSessionEndpoint = context.getCurrentXmlTest().getParameter("endSessionEndpoint");
742  jwksUri = context.getCurrentXmlTest().getParameter("jwksUri");
743  registrationEndpoint = context.getCurrentXmlTest().getParameter("registrationEndpoint");
744  configurationEndpoint = context.getCurrentXmlTest().getParameter("configurationEndpoint");
745  idGenEndpoint = context.getCurrentXmlTest().getParameter("idGenEndpoint");
746  introspectionEndpoint = context.getCurrentXmlTest().getParameter("introspectionEndpoint");
747  scopeToClaimsMapping = new HashMap<String, List<String>>();
748  }
749 
751  }
String registrationEndpoint
Definition: BaseTest.java:81
String getIntrospectionEndpoint()
Definition: OpenIdConfigurationResponse.java:343
List< String > getTokenEndpointAuthMethodsSupported()
Definition: OpenIdConfigurationResponse.java:642
String determineAuthorizationPageEndpoint(String authorizationEndpoint)
Definition: BaseTest.java:753
String jwksUri
Definition: BaseTest.java:80
String getRegistrationEndpoint()
Definition: OpenIdConfigurationResponse.java:310
String clientInfoEndpoint
Definition: BaseTest.java:77
String getCheckSessionIFrame()
Definition: OpenIdConfigurationResponse.java:248
String authorizationPageEndpoint
Definition: BaseTest.java:73
String idGenEndpoint
Definition: BaseTest.java:83
String getIdGenerationEndpoint()
Definition: OpenIdConfigurationResponse.java:327
static void showClient(BaseClient client)
Definition: BaseTest.java:775
List< String > getRequestObjectSigningAlgValuesSupported()
Definition: OpenIdConfigurationResponse.java:579
String loginFormUsername
Definition: BaseTest.java:88
String loginFormPassword
Definition: BaseTest.java:89
String configurationEndpoint
Definition: BaseTest.java:82
List< String > getSubjectTypesSupported()
Definition: OpenIdConfigurationResponse.java:438
String getEndSessionEndpoint()
Definition: OpenIdConfigurationResponse.java:268
String tokenEndpoint
Definition: BaseTest.java:75
String authorizeFormDoNotAllowButton
Definition: BaseTest.java:92
List< String > getAcrValuesSupported()
Definition: OpenIdConfigurationResponse.java:418
String getClientInfoEndpoint()
Definition: OpenIdConfigurationResponse.java:228
List< String > getGrantTypesSupported()
Definition: OpenIdConfigurationResponse.java:398
String checkSessionIFrame
Definition: BaseTest.java:78
void setExecutor(ClientExecutor executor)
Definition: BaseClient.java:84
OpenIdConfigurationResponse execOpenIdConfiguration()
Definition: OpenIdConfigurationClient.java:47
String loginFormLoginButton
Definition: BaseTest.java:90
String gluuConfigurationEndpoint
Definition: BaseTest.java:74
Map< String, List< String > > getScopeToClaimsMapping()
Definition: OpenIdConfigurationResponse.java:136
String getJwksUri()
Definition: OpenIdConfigurationResponse.java:289
String getTokenEndpoint()
Definition: OpenIdConfigurationResponse.java:192
List< String > getIdTokenSigningAlgValuesSupported()
Definition: OpenIdConfigurationResponse.java:519
Definition: OpenIdConnectDiscoveryClient.java:29
String introspectionEndpoint
Definition: BaseTest.java:84
void showTitle(String title)
Definition: BaseTest.java:761
List< String > getResponseTypesSupported()
Definition: OpenIdConfigurationResponse.java:378
String endSessionEndpoint
Definition: BaseTest.java:79
String getSubject()
Definition: OpenIdConnectDiscoveryResponse.java:32
List< String > getScopesSupported()
Definition: OpenIdConfigurationResponse.java:360
String determineGluuConfigurationEndpoint(String host)
Definition: BaseTest.java:757
OpenIdConnectDiscoveryResponse exec()
Definition: OpenIdConnectDiscoveryClient.java:47
String getAuthorizationEndpoint()
Definition: OpenIdConfigurationResponse.java:174
String userInfoEndpoint
Definition: BaseTest.java:76
Definition: OpenIdConfigurationClient.java:27
int getStatus()
Definition: BaseResponse.java:49
List< WebFingerLink > getLinks()
Definition: OpenIdConnectDiscoveryResponse.java:40
List< String > getClaimsSupported()
Definition: OpenIdConfigurationResponse.java:728
Definition: OpenIdConnectDiscoveryResponse.java:17
String authorizationEndpoint
Definition: BaseTest.java:72
String getUserInfoEndpoint()
Definition: OpenIdConfigurationResponse.java:210
Definition: OpenIdConfigurationResponse.java:26
static ClientExecutor clientExecutor()
Definition: BaseTest.java:822
Map< String, List< String > > scopeToClaimsMapping
Definition: BaseTest.java:85
String authorizeFormAllowButton
Definition: BaseTest.java:91
String getIssuer()
Definition: OpenIdConfigurationResponse.java:156

◆ fails()

static void org.xdi.oxauth.BaseTest.fails ( Throwable  e)
inlinestaticinherited
50  {
51  Assert.fail(e.getMessage(), e);
52  }

◆ getAuthorizationEndpoint()

String org.xdi.oxauth.BaseTest.getAuthorizationEndpoint ( )
inlineinherited
134  {
135  return authorizationEndpoint;
136  }
String authorizationEndpoint
Definition: BaseTest.java:72

◆ getCheckSessionIFrame()

String org.xdi.oxauth.BaseTest.getCheckSessionIFrame ( )
inlineinherited
166  {
167  return checkSessionIFrame;
168  }
String checkSessionIFrame
Definition: BaseTest.java:78

◆ getClientInfoEndpoint()

String org.xdi.oxauth.BaseTest.getClientInfoEndpoint ( )
inlineinherited
158  {
159  return clientInfoEndpoint;
160  }
String clientInfoEndpoint
Definition: BaseTest.java:77

◆ getConfigurationEndpoint()

String org.xdi.oxauth.BaseTest.getConfigurationEndpoint ( )
inlineinherited
222  {
223  return configurationEndpoint;
224  }
String configurationEndpoint
Definition: BaseTest.java:82

◆ getDriver()

WebDriver org.xdi.oxauth.BaseTest.getDriver ( )
inlineinherited
126  {
127  return driver;
128  }
WebDriver driver
Definition: BaseTest.java:70

◆ getEndSessionEndpoint()

String org.xdi.oxauth.BaseTest.getEndSessionEndpoint ( )
inlineinherited
174  {
175  return endSessionEndpoint;
176  }
String endSessionEndpoint
Definition: BaseTest.java:79

◆ getIdGenEndpoint()

String org.xdi.oxauth.BaseTest.getIdGenEndpoint ( )
inlineinherited
214  {
215  return idGenEndpoint;
216  }
String idGenEndpoint
Definition: BaseTest.java:83

◆ getIntrospectionEndpoint()

String org.xdi.oxauth.BaseTest.getIntrospectionEndpoint ( )
inlineinherited
198  {
199  return introspectionEndpoint;
200  }
String introspectionEndpoint
Definition: BaseTest.java:84

◆ getJwksUri()

String org.xdi.oxauth.BaseTest.getJwksUri ( )
inlineinherited
182  {
183  return jwksUri;
184  }
String jwksUri
Definition: BaseTest.java:80

◆ getRegistrationEndpoint()

String org.xdi.oxauth.BaseTest.getRegistrationEndpoint ( )
inlineinherited
190  {
191  return registrationEndpoint;
192  }
String registrationEndpoint
Definition: BaseTest.java:81

◆ getScopeToClaimsMapping()

Map<String, List<String> > org.xdi.oxauth.BaseTest.getScopeToClaimsMapping ( )
inlineinherited
206  {
207  return scopeToClaimsMapping;
208  }
Map< String, List< String > > scopeToClaimsMapping
Definition: BaseTest.java:85

◆ getTokenEndpoint()

String org.xdi.oxauth.BaseTest.getTokenEndpoint ( )
inlineinherited
142  {
143  return tokenEndpoint;
144  }
String tokenEndpoint
Definition: BaseTest.java:75

◆ getUserInfoEndpoint()

String org.xdi.oxauth.BaseTest.getUserInfoEndpoint ( )
inlineinherited
150  {
151  return userInfoEndpoint;
152  }
String userInfoEndpoint
Definition: BaseTest.java:76

◆ initTestSuite()

void org.xdi.oxauth.BaseTest.initTestSuite ( ITestContext  context) throws FileNotFoundException, IOException
inlineinherited
95  {
96  SecurityProviderUtility.installBCProvider();
97 
98  Reporter.log("Invoked init test suite method \n", true);
99 
100  String propertiesFile = context.getCurrentXmlTest().getParameter("propertiesFile");
101  if (StringHelper.isEmpty(propertiesFile)) {
102  propertiesFile = "target/test-classes/testng.properties";
103  //propertiesFile = "U:\\own\\project\\git\\oxAuth\\Client\\src\\test\\resources\\testng_yuriy.properties";
104  //propertiesFile = "/Users/JAVIER/IdeaProjects/oxAuth/Client/target/test-classes/testng.properties";
105  }
106 
107  FileInputStream conf = new FileInputStream(propertiesFile);
108  Properties prop = new Properties();
109  prop.load(conf);
110 
111  Map<String, String> parameters = new HashMap<String, String>();
112  for (Entry<Object, Object> entry : prop.entrySet()) {
113  Object key = entry.getKey();
114  Object value = entry.getValue();
115 
116  if (StringHelper.isEmptyString(key) || StringHelper.isEmptyString(value)) {
117  continue;
118  }
119  parameters.put(key.toString(), value.toString());
120  }
121 
122  // Overrided test paramters
123  context.getSuite().getXmlSuite().setParameters(parameters);
124  }

◆ omittedResponseTypesStep1()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.omittedResponseTypesStep1 ( final String  registerPath,
final String  redirectUris 
) throws Exception
inline

Registering without provide the response_types param, should register the Client using only the code response type.

92  {
93  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + registerPath).request();
94 
95  String registerRequestContent = null;
96  try {
97  RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
98  StringUtils.spaceSeparatedToList(redirectUris));
99  registerRequest.addCustomAttribute("oxAuthTrustedClient", "true");
100 
101  registerRequestContent = registerRequest.getJSONParameters().toString(4);
102  } catch (JSONException e) {
103  e.printStackTrace();
104  fail(e.getMessage());
105  }
106 
107  Response response = request.post(Entity.json(registerRequestContent));
108  String entity = response.readEntity(String.class);
109 
110  showResponse("omittedResponseTypesStep1", response, entity);
111 
112  assertEquals(response.getStatus(), 200, "Unexpected response code. " + entity);
113  assertNotNull(entity, "Unexpected result: " + entity);
114  try {
115  JSONObject jsonObj = new JSONObject(entity);
116  assertTrue(jsonObj.has(RegisterResponseParam.CLIENT_ID.toString()));
117  assertTrue(jsonObj.has(CLIENT_SECRET.toString()));
118  assertTrue(jsonObj.has(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString()));
119  assertTrue(jsonObj.has(REGISTRATION_CLIENT_URI.toString()));
120  assertTrue(jsonObj.has(CLIENT_ID_ISSUED_AT.toString()));
121  assertTrue(jsonObj.has(CLIENT_SECRET_EXPIRES_AT.toString()));
122 
123  clientId1 = jsonObj.getString(RegisterResponseParam.CLIENT_ID.toString());
124  clientSecret1 = jsonObj.getString(CLIENT_SECRET.toString());
125  registrationAccessToken1 = jsonObj.getString(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString());
126  registrationClientUri1 = jsonObj.getString(RegisterResponseParam.REGISTRATION_CLIENT_URI.toString());
127  } catch (JSONException e) {
128  e.printStackTrace();
129  fail(e.getMessage() + "\nResponse was: " + entity);
130  }
131  }
static String registrationAccessToken1
Definition: ResponseTypesRestrictionEmbeddedTest.java:72
static String clientId1
Definition: ResponseTypesRestrictionEmbeddedTest.java:70
static String clientSecret1
Definition: ResponseTypesRestrictionEmbeddedTest.java:71
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68
static String registrationClientUri1
Definition: ResponseTypesRestrictionEmbeddedTest.java:73

◆ omittedResponseTypesStep2()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.omittedResponseTypesStep2 ( final String  registerPath) throws Exception
inline

Client read request to verify the Client using the default code response type.

139  {
140  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + registerPath + "?"
141  + registrationClientUri1.substring(registrationClientUri1.indexOf("?") + 1)).request();
142  request.header("Authorization", "Bearer " + registrationAccessToken1);
143 
144  Response response = request.get();
145  String entity = response.readEntity(String.class);
146 
147  showResponse("omittedResponseTypesStep2", response, entity);
148 
149  assertEquals(response.getStatus(), 200, "Unexpected response code. " + entity);
150  assertNotNull(entity, "Unexpected result: " + entity);
151  try {
152  JSONObject jsonObj = new JSONObject(entity);
153  assertTrue(jsonObj.has(RegisterResponseParam.CLIENT_ID.toString()));
154  assertTrue(jsonObj.has(CLIENT_SECRET.toString()));
155  assertTrue(jsonObj.has(CLIENT_ID_ISSUED_AT.toString()));
156  assertTrue(jsonObj.has(CLIENT_SECRET_EXPIRES_AT.toString()));
157 
158  // Registered Metadata
159  assertTrue(jsonObj.has(RESPONSE_TYPES.toString()));
160  assertNotNull(jsonObj.optJSONArray(RESPONSE_TYPES.toString()));
161  assertEquals(jsonObj.getJSONArray(RESPONSE_TYPES.toString()).getString(0), ResponseType.CODE.toString());
162  assertTrue(jsonObj.has(REDIRECT_URIS.toString()));
163  assertTrue(jsonObj.has(APPLICATION_TYPE.toString()));
164  assertTrue(jsonObj.has(CLIENT_NAME.toString()));
165  assertTrue(jsonObj.has(ID_TOKEN_SIGNED_RESPONSE_ALG.toString()));
166  assertTrue(jsonObj.has(SCOPE.toString()));
167  } catch (JSONException e) {
168  e.printStackTrace();
169  fail(e.getMessage() + "\nResponse was: " + entity);
170  }
171  }
static String registrationAccessToken1
Definition: ResponseTypesRestrictionEmbeddedTest.java:72
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68
static String registrationClientUri1
Definition: ResponseTypesRestrictionEmbeddedTest.java:73

◆ omittedResponseTypesStep3a()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.omittedResponseTypesStep3a ( final String  authorizePath,
final String  userId,
final String  userSecret,
final String  redirectUri 
) throws Exception
inline

Request Authorization with Response Type code should succeed.

180  {
181  List<ResponseType> responseTypes = Arrays.asList(ResponseType.CODE);
182  List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
183  String state = UUID.randomUUID().toString();
184 
185  AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId1, scopes,
186  redirectUri, null);
187  authorizationRequest.setState(state);
188  authorizationRequest.getPrompts().add(Prompt.NONE);
189  authorizationRequest.setAuthUsername(userId);
190  authorizationRequest.setAuthPassword(userSecret);
191 
192  Builder request = ResteasyClientBuilder.newClient()
193  .target(url.toString() + authorizePath + "?" + authorizationRequest.getQueryString()).request();
194  request.header("Authorization", "Basic " + authorizationRequest.getEncodedCredentials());
195  request.header("Accept", MediaType.TEXT_PLAIN);
196 
197  Response response = request.get();
198  String entity = response.readEntity(String.class);
199 
200  showResponse("omittedResponseTypesStep3a", response, entity);
201 
202  assertEquals(response.getStatus(), 302, "Unexpected response code.");
203  assertNotNull(response.getLocation(), "Unexpected result: " + response.getLocation());
204 
205  if (response.getLocation() != null) {
206  try {
207  URI uri = new URI(response.getLocation().toString());
208  assertNotNull(uri.getQuery(), "The query string is null");
209 
210  Map<String, String> params = QueryStringDecoder.decode(uri.getQuery());
211 
212  assertNotNull(params.get(AuthorizeResponseParam.CODE), "The code is null");
213  assertNotNull(params.get(AuthorizeResponseParam.SCOPE), "The scope is null");
214  assertNotNull(params.get(AuthorizeResponseParam.STATE), "The state is null");
215  assertFalse(params.containsKey(AuthorizeResponseParam.ID_TOKEN));
216  assertFalse(params.containsKey(AuthorizeResponseParam.ACCESS_TOKEN));
217 
218  authorizationCode1 = params.get(AuthorizeResponseParam.CODE);
219  } catch (URISyntaxException e) {
220  e.printStackTrace();
221  fail("Response URI is not well formed");
222  } catch (Exception e) {
223  e.printStackTrace();
224  fail(e.getMessage());
225  }
226  }
227  }
static String clientId1
Definition: ResponseTypesRestrictionEmbeddedTest.java:70
static String authorizationCode1
Definition: ResponseTypesRestrictionEmbeddedTest.java:74
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ omittedResponseTypesStep3b()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.omittedResponseTypesStep3b ( final String  tokenPath,
final String  redirectUri 
) throws Exception
inline
231  {
232  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + tokenPath).request();
233 
234  TokenRequest tokenRequest = new TokenRequest(GrantType.AUTHORIZATION_CODE);
235  tokenRequest.setCode(authorizationCode1);
236  tokenRequest.setRedirectUri(redirectUri);
237  tokenRequest.setAuthUsername(clientId1);
238  tokenRequest.setAuthPassword(clientSecret1);
239 
240  request.header("Authorization", "Basic " + tokenRequest.getEncodedCredentials());
241  request.header("Content-Type", MediaType.APPLICATION_FORM_URLENCODED);
242 
243  Response response = request
244  .post(Entity.form(new MultivaluedHashMap<String, String>(tokenRequest.getParameters())));
245  String entity = response.readEntity(String.class);
246 
247  showResponse("omittedResponseTypesStep3b", response, entity);
248 
249  assertEquals(response.getStatus(), 200, "Unexpected response code.");
250  assertTrue(
251  response.getHeaderString("Cache-Control") != null
252  && response.getHeaderString("Cache-Control").equals("no-store"),
253  "Unexpected result: " + response.getHeaderString("Cache-Control"));
254  assertTrue(response.getHeaderString("Pragma") != null && response.getHeaderString("Pragma").equals("no-cache"),
255  "Unexpected result: " + response.getHeaderString("Pragma"));
256  assertNotNull(entity, "Unexpected result: " + entity);
257  try {
258  JSONObject jsonObj = new JSONObject(entity);
259  assertTrue(jsonObj.has("access_token"), "Unexpected result: access_token not found");
260  assertTrue(jsonObj.has("token_type"), "Unexpected result: token_type not found");
261  assertTrue(jsonObj.has("refresh_token"), "Unexpected result: refresh_token not found");
262  assertTrue(jsonObj.has("id_token"));
263  } catch (JSONException e) {
264  e.printStackTrace();
265  fail(e.getMessage() + "\nResponse was: " + entity);
266  } catch (Exception e) {
267  e.printStackTrace();
268  fail(e.getMessage());
269  }
270  }
static String clientId1
Definition: ResponseTypesRestrictionEmbeddedTest.java:70
static String clientSecret1
Definition: ResponseTypesRestrictionEmbeddedTest.java:71
static String authorizationCode1
Definition: ResponseTypesRestrictionEmbeddedTest.java:74
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ omittedResponseTypesStep4()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.omittedResponseTypesStep4 ( final String  authorizePath,
final String  userId,
final String  userSecret,
final String  redirectUri,
final List< ResponseType responseTypes 
) throws Exception
inline

Authorization request with the other Response types combination should fail.

298  {
299  List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
300  String nonce = UUID.randomUUID().toString();
301 
302  AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId1, scopes,
303  redirectUri, nonce);
304  authorizationRequest.setState("af0ifjsldkj");
305  authorizationRequest.getPrompts().add(Prompt.NONE);
306  authorizationRequest.setAuthUsername(userId);
307  authorizationRequest.setAuthPassword(userSecret);
308 
309  Builder request = ResteasyClientBuilder.newClient()
310  .target(url.toString() + authorizePath + "?" + authorizationRequest.getQueryString()).request();
311  request.header("Authorization", "Basic " + authorizationRequest.getEncodedCredentials());
312  request.header("Accept", MediaType.TEXT_PLAIN);
313 
314  Response response = request.get();
315  String entity = response.readEntity(String.class);
316 
317  showResponse("omittedResponseTypesStep4", response, entity);
318 
319  if (response.getStatus() == 400) {
320  assertNotNull(entity, "Unexpected result: " + entity);
321  try {
322  JSONObject jsonObj = new JSONObject(entity);
323  assertTrue(jsonObj.has("error"), "The error type is null");
324  assertTrue(jsonObj.has("error_description"), "The error description is null");
325  } catch (JSONException e) {
326  e.printStackTrace();
327  fail(e.getMessage() + "\nResponse was: " + entity);
328  }
329  } else {
330  fail("Unexpected response code: " + response.getStatus());
331  }
332  }
static String clientId1
Definition: ResponseTypesRestrictionEmbeddedTest.java:70
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ omittedResponseTypesStep4DataProvider()

Object [][] org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.omittedResponseTypesStep4DataProvider ( ITestContext  context)
inline
273  {
274  String authorizePath = context.getCurrentXmlTest().getParameter("authorizePath");
275  String userId = context.getCurrentXmlTest().getParameter("userId");
276  String userSecret = context.getCurrentXmlTest().getParameter("userSecret");
277  String redirectUri = context.getCurrentXmlTest().getParameter("redirectUri");
278 
279  return new Object[][]{
280  {authorizePath, userId, userSecret, redirectUri,
281  Arrays.asList(ResponseType.CODE, ResponseType.ID_TOKEN)},
282  {authorizePath, userId, userSecret, redirectUri, Arrays.asList(ResponseType.TOKEN)},
283  {authorizePath, userId, userSecret, redirectUri,
284  Arrays.asList(ResponseType.TOKEN, ResponseType.ID_TOKEN)},
285  {authorizePath, userId, userSecret, redirectUri,
286  Arrays.asList(ResponseType.CODE, ResponseType.TOKEN)},
287  {authorizePath, userId, userSecret, redirectUri,
288  Arrays.asList(ResponseType.CODE, ResponseType.TOKEN, ResponseType.ID_TOKEN)},
289  {authorizePath, userId, userSecret, redirectUri, Arrays.asList(ResponseType.ID_TOKEN)},};
290  }

◆ output()

static void org.xdi.oxauth.BaseTest.output ( String  p_msg)
inlinestaticinherited
54  {
55  System.out.println(p_msg);
56  }

◆ responseTypesCodeIdTokenStep1()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesCodeIdTokenStep1 ( final String  registerPath,
final String  redirectUris 
) throws Exception
inline

Registering with the response_types param code, id_token.

339  {
340  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + registerPath).request();
341 
342  String registerRequestContent = null;
343  try {
344  List<ResponseType> responseTypes = Arrays.asList(ResponseType.CODE, ResponseType.ID_TOKEN);
345 
346  RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
347  StringUtils.spaceSeparatedToList(redirectUris));
348  registerRequest.setResponseTypes(responseTypes);
349  registerRequest.addCustomAttribute("oxAuthTrustedClient", "true");
350 
351  registerRequestContent = registerRequest.getJSONParameters().toString(4);
352  } catch (JSONException e) {
353  e.printStackTrace();
354  fail(e.getMessage());
355  }
356 
357  Response response = request.post(Entity.json(registerRequestContent));
358  String entity = response.readEntity(String.class);
359 
360  showResponse("responseTypesCodeIdTokenStep1", response, entity);
361 
362  assertEquals(response.getStatus(), 200, "Unexpected response code. " + entity);
363  assertNotNull(entity, "Unexpected result: " + entity);
364  try {
365  JSONObject jsonObj = new JSONObject(entity);
366  assertTrue(jsonObj.has(RegisterResponseParam.CLIENT_ID.toString()));
367  assertTrue(jsonObj.has(CLIENT_SECRET.toString()));
368  assertTrue(jsonObj.has(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString()));
369  assertTrue(jsonObj.has(REGISTRATION_CLIENT_URI.toString()));
370  assertTrue(jsonObj.has(CLIENT_ID_ISSUED_AT.toString()));
371  assertTrue(jsonObj.has(CLIENT_SECRET_EXPIRES_AT.toString()));
372 
373  clientId2 = jsonObj.getString(RegisterResponseParam.CLIENT_ID.toString());
374  clientSecret2 = jsonObj.getString(CLIENT_SECRET.toString());
375  registrationAccessToken2 = jsonObj.getString(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString());
376  registrationClientUri2 = jsonObj.getString(RegisterResponseParam.REGISTRATION_CLIENT_URI.toString());
377  } catch (JSONException e) {
378  e.printStackTrace();
379  fail(e.getMessage() + "\nResponse was: " + entity);
380  }
381  }
static String clientSecret2
Definition: ResponseTypesRestrictionEmbeddedTest.java:77
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68
static String registrationClientUri2
Definition: ResponseTypesRestrictionEmbeddedTest.java:79
static String registrationAccessToken2
Definition: ResponseTypesRestrictionEmbeddedTest.java:78
static String clientId2
Definition: ResponseTypesRestrictionEmbeddedTest.java:76

◆ responseTypesCodeIdTokenStep2()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesCodeIdTokenStep2 ( final String  registerPath) throws Exception
inline

Client read request to verify the Client using the code and id_token response types.

389  {
390  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + registerPath + "?"
391  + registrationClientUri2.substring(registrationClientUri2.indexOf("?") + 1)).request();
392  request.header("Authorization", "Bearer " + registrationAccessToken2);
393 
394  Response response = request.get();
395  String entity = response.readEntity(String.class);
396 
397  showResponse("responseTypesCodeIdTokenStep2", response, entity);
398 
399  assertEquals(response.getStatus(), 200, "Unexpected response code. " + entity);
400  assertNotNull(entity, "Unexpected result: " + entity);
401  try {
402  JSONObject jsonObj = new JSONObject(entity);
403  assertTrue(jsonObj.has(RegisterResponseParam.CLIENT_ID.toString()));
404  assertTrue(jsonObj.has(CLIENT_SECRET.toString()));
405  assertTrue(jsonObj.has(CLIENT_ID_ISSUED_AT.toString()));
406  assertTrue(jsonObj.has(CLIENT_SECRET_EXPIRES_AT.toString()));
407 
408  // Registered Metadata
409  assertTrue(jsonObj.has(RESPONSE_TYPES.toString()));
410  assertNotNull(jsonObj.optJSONArray(RESPONSE_TYPES.toString()));
411  Set<String> responseTypes = new HashSet<String>();
412  for (int i = 0; i < jsonObj.getJSONArray(RESPONSE_TYPES.toString()).length(); i++) {
413  responseTypes.add(jsonObj.getJSONArray(RESPONSE_TYPES.toString()).getString(i));
414  }
415  assertTrue(responseTypes
416  .containsAll(Arrays.asList(ResponseType.CODE.toString(), ResponseType.ID_TOKEN.toString())));
417  assertTrue(jsonObj.has(REDIRECT_URIS.toString()));
418  assertTrue(jsonObj.has(APPLICATION_TYPE.toString()));
419  assertTrue(jsonObj.has(CLIENT_NAME.toString()));
420  assertTrue(jsonObj.has(ID_TOKEN_SIGNED_RESPONSE_ALG.toString()));
421  assertTrue(jsonObj.has(SCOPE.toString()));
422  } catch (JSONException e) {
423  e.printStackTrace();
424  fail(e.getMessage() + "\nResponse was: " + entity);
425  }
426  }
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68
static String registrationClientUri2
Definition: ResponseTypesRestrictionEmbeddedTest.java:79
static String registrationAccessToken2
Definition: ResponseTypesRestrictionEmbeddedTest.java:78

◆ responseTypesCodeIdTokenStep3a()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesCodeIdTokenStep3a ( final String  authorizePath,
final String  userId,
final String  userSecret,
final String  redirectUri 
) throws Exception
inline

Request Authorization with Response Type code should succeed.

435  {
436  List<ResponseType> responseTypes = Arrays.asList(ResponseType.CODE, ResponseType.ID_TOKEN);
437  List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
438  String state = UUID.randomUUID().toString();
439  String nonce = UUID.randomUUID().toString();
440 
441  AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId2, scopes,
442  redirectUri, nonce);
443  authorizationRequest.setState(state);
444  authorizationRequest.getPrompts().add(Prompt.NONE);
445  authorizationRequest.setAuthUsername(userId);
446  authorizationRequest.setAuthPassword(userSecret);
447 
448  Builder request = ResteasyClientBuilder.newClient()
449  .target(url.toString() + authorizePath + "?" + authorizationRequest.getQueryString()).request();
450  request.header("Authorization", "Basic " + authorizationRequest.getEncodedCredentials());
451  request.header("Accept", MediaType.TEXT_PLAIN);
452 
453  Response response = request.get();
454  String entity = response.readEntity(String.class);
455 
456  showResponse("responseTypesCodeIdTokenStep3a", response, entity);
457 
458  assertEquals(response.getStatus(), 302, "Unexpected response code.");
459  assertNotNull(response.getLocation(), "Unexpected result: " + response.getLocation());
460 
461  if (response.getLocation() != null) {
462  try {
463  URI uri = new URI(response.getLocation().toString());
464  assertNotNull(uri.getFragment(), "The fragment is null");
465 
466  Map<String, String> params = QueryStringDecoder.decode(uri.getFragment());
467 
468  assertTrue(params.containsKey(AuthorizeResponseParam.CODE));
469  assertTrue(params.containsKey(AuthorizeResponseParam.SCOPE));
470  assertTrue(params.containsKey(AuthorizeResponseParam.STATE));
471  assertTrue(params.containsKey(AuthorizeResponseParam.ID_TOKEN));
472  assertFalse(params.containsKey(AuthorizeResponseParam.ACCESS_TOKEN));
473 
474  authorizationCode2 = params.get(AuthorizeResponseParam.CODE);
475  } catch (URISyntaxException e) {
476  e.printStackTrace();
477  fail("Response URI is not well formed");
478  } catch (Exception e) {
479  e.printStackTrace();
480  fail(e.getMessage());
481  }
482  }
483  }
static String authorizationCode2
Definition: ResponseTypesRestrictionEmbeddedTest.java:80
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68
static String clientId2
Definition: ResponseTypesRestrictionEmbeddedTest.java:76

◆ responseTypesCodeIdTokenStep3b()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesCodeIdTokenStep3b ( final String  tokenPath,
final String  redirectUri 
) throws Exception
inline
487  {
488  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + tokenPath).request();
489 
490  TokenRequest tokenRequest = new TokenRequest(GrantType.AUTHORIZATION_CODE);
491  tokenRequest.setCode(authorizationCode2);
492  tokenRequest.setRedirectUri(redirectUri);
493  tokenRequest.setAuthUsername(clientId2);
494  tokenRequest.setAuthPassword(clientSecret2);
495 
496  request.header("Authorization", "Basic " + tokenRequest.getEncodedCredentials());
497  request.header("Content-Type", MediaType.APPLICATION_FORM_URLENCODED);
498 
499  Response response = request
500  .post(Entity.form(new MultivaluedHashMap<String, String>(tokenRequest.getParameters())));
501  String entity = response.readEntity(String.class);
502 
503  showResponse("responseTypesCodeIdTokenStep3b", response, entity);
504 
505  assertEquals(response.getStatus(), 200, "Unexpected response code.");
506  assertTrue(
507  response.getHeaderString("Cache-Control") != null
508  && response.getHeaderString("Cache-Control").equals("no-store"),
509  "Unexpected result: " + response.getHeaderString("Cache-Control"));
510  assertTrue(response.getHeaderString("Pragma") != null && response.getHeaderString("Pragma").equals("no-cache"),
511  "Unexpected result: " + response.getHeaderString("Pragma"));
512  assertNotNull(entity, "Unexpected result: " + entity);
513  try {
514  JSONObject jsonObj = new JSONObject(entity);
515  assertTrue(jsonObj.has("access_token"), "Unexpected result: access_token not found");
516  assertTrue(jsonObj.has("token_type"), "Unexpected result: token_type not found");
517  assertTrue(jsonObj.has("refresh_token"), "Unexpected result: refresh_token not found");
518  assertTrue(jsonObj.has("id_token"));
519  } catch (JSONException e) {
520  e.printStackTrace();
521  fail(e.getMessage() + "\nResponse was: " + entity);
522  } catch (Exception e) {
523  e.printStackTrace();
524  fail(e.getMessage());
525  }
526  }
static String authorizationCode2
Definition: ResponseTypesRestrictionEmbeddedTest.java:80
static String clientSecret2
Definition: ResponseTypesRestrictionEmbeddedTest.java:77
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68
static String clientId2
Definition: ResponseTypesRestrictionEmbeddedTest.java:76

◆ responseTypesCodeIdTokenStep4()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesCodeIdTokenStep4 ( final String  authorizePath,
final String  userId,
final String  userSecret,
final String  redirectUri,
final List< ResponseType responseTypes 
) throws Exception
inline

Authorization request with the other Response types combination should fail.

551  {
552  List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
553  String nonce = UUID.randomUUID().toString();
554 
555  AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId1, scopes,
556  redirectUri, nonce);
557  authorizationRequest.setState("af0ifjsldkj");
558  authorizationRequest.getPrompts().add(Prompt.NONE);
559  authorizationRequest.setAuthUsername(userId);
560  authorizationRequest.setAuthPassword(userSecret);
561 
562  Builder request = ResteasyClientBuilder.newClient()
563  .target(url.toString() + authorizePath + "?" + authorizationRequest.getQueryString()).request();
564  request.header("Authorization", "Basic " + authorizationRequest.getEncodedCredentials());
565  request.header("Accept", MediaType.TEXT_PLAIN);
566 
567  Response response = request.get();
568  String entity = response.readEntity(String.class);
569 
570  showResponse("responseTypesCodeIdTokenStep4", response, entity);
571 
572  if (response.getStatus() == 400) {
573  assertNotNull(entity, "Unexpected result: " + entity);
574  try {
575  JSONObject jsonObj = new JSONObject(entity);
576  assertTrue(jsonObj.has("error"), "The error type is null");
577  assertTrue(jsonObj.has("error_description"), "The error description is null");
578  } catch (JSONException e) {
579  e.printStackTrace();
580  fail(e.getMessage() + "\nResponse was: " + entity);
581  }
582  } else {
583  fail("Unexpected response code: " + response.getStatus());
584  }
585  }
static String clientId1
Definition: ResponseTypesRestrictionEmbeddedTest.java:70
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ responseTypesCodeIdTokenStep4DataProvider()

Object [][] org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesCodeIdTokenStep4DataProvider ( ITestContext  context)
inline
529  {
530  String authorizePath = context.getCurrentXmlTest().getParameter("authorizePath");
531  String userId = context.getCurrentXmlTest().getParameter("userId");
532  String userSecret = context.getCurrentXmlTest().getParameter("userSecret");
533  String redirectUri = context.getCurrentXmlTest().getParameter("redirectUri");
534 
535  return new Object[][]{{authorizePath, userId, userSecret, redirectUri, Arrays.asList(ResponseType.TOKEN)},
536  {authorizePath, userId, userSecret, redirectUri,
537  Arrays.asList(ResponseType.TOKEN, ResponseType.ID_TOKEN)},
538  {authorizePath, userId, userSecret, redirectUri,
539  Arrays.asList(ResponseType.CODE, ResponseType.TOKEN)},
540  {authorizePath, userId, userSecret, redirectUri,
541  Arrays.asList(ResponseType.CODE, ResponseType.TOKEN, ResponseType.ID_TOKEN)},
542  {authorizePath, userId, userSecret, redirectUri, Arrays.asList(ResponseType.ID_TOKEN)},};
543  }

◆ responseTypesTokenIdTokenStep1()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesTokenIdTokenStep1 ( final String  registerPath,
final String  redirectUris 
) throws Exception
inline

Registering with the response_types param token, id_token.

592  {
593  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + registerPath).request();
594 
595  String registerRequestContent = null;
596  try {
597  List<ResponseType> responseTypes = Arrays.asList(ResponseType.TOKEN, ResponseType.ID_TOKEN);
598 
599  RegisterRequest registerRequest = new RegisterRequest(ApplicationType.WEB, "oxAuth test app",
600  StringUtils.spaceSeparatedToList(redirectUris));
601  registerRequest.setResponseTypes(responseTypes);
602  registerRequest.addCustomAttribute("oxAuthTrustedClient", "true");
603 
604  registerRequestContent = registerRequest.getJSONParameters().toString(4);
605  } catch (JSONException e) {
606  e.printStackTrace();
607  fail(e.getMessage());
608  }
609 
610  Response response = request.post(Entity.json(registerRequestContent));
611  String entity = response.readEntity(String.class);
612 
613  showResponse("responseTypesTokenIdTokenStep1", response, entity);
614 
615  assertEquals(response.getStatus(), 200, "Unexpected response code. " + entity);
616  assertNotNull(entity, "Unexpected result: " + entity);
617  try {
618  JSONObject jsonObj = new JSONObject(entity);
619  assertTrue(jsonObj.has(RegisterResponseParam.CLIENT_ID.toString()));
620  assertTrue(jsonObj.has(CLIENT_SECRET.toString()));
621  assertTrue(jsonObj.has(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString()));
622  assertTrue(jsonObj.has(REGISTRATION_CLIENT_URI.toString()));
623  assertTrue(jsonObj.has(CLIENT_ID_ISSUED_AT.toString()));
624  assertTrue(jsonObj.has(CLIENT_SECRET_EXPIRES_AT.toString()));
625 
626  clientId3 = jsonObj.getString(RegisterResponseParam.CLIENT_ID.toString());
627  registrationAccessToken3 = jsonObj.getString(RegisterResponseParam.REGISTRATION_ACCESS_TOKEN.toString());
628  registrationClientUri3 = jsonObj.getString(RegisterResponseParam.REGISTRATION_CLIENT_URI.toString());
629  } catch (JSONException e) {
630  e.printStackTrace();
631  fail(e.getMessage() + "\nResponse was: " + entity);
632  }
633  }
static String registrationClientUri3
Definition: ResponseTypesRestrictionEmbeddedTest.java:84
static String registrationAccessToken3
Definition: ResponseTypesRestrictionEmbeddedTest.java:83
static String clientId3
Definition: ResponseTypesRestrictionEmbeddedTest.java:82
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ responseTypesTokenIdTokenStep2()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesTokenIdTokenStep2 ( final String  registerPath) throws Exception
inline

Client read request to verify the Client using the token and id_token response types.

641  {
642  Builder request = ResteasyClientBuilder.newClient().target(url.toString() + registerPath + "?"
643  + registrationClientUri3.substring(registrationClientUri3.indexOf("?") + 1)).request();
644  request.header("Authorization", "Bearer " + registrationAccessToken3);
645 
646  Response response = request.get();
647  String entity = response.readEntity(String.class);
648 
649  showResponse("responseTypesTokenIdTokenStep2", response, entity);
650 
651  assertEquals(response.getStatus(), 200, "Unexpected response code. " + entity);
652  assertNotNull(entity, "Unexpected result: " + entity);
653  try {
654  JSONObject jsonObj = new JSONObject(entity);
655  assertTrue(jsonObj.has(RegisterResponseParam.CLIENT_ID.toString()));
656  assertTrue(jsonObj.has(CLIENT_SECRET.toString()));
657  assertTrue(jsonObj.has(CLIENT_ID_ISSUED_AT.toString()));
658  assertTrue(jsonObj.has(CLIENT_SECRET_EXPIRES_AT.toString()));
659 
660  // Registered Metadata
661  assertTrue(jsonObj.has(RESPONSE_TYPES.toString()));
662  assertNotNull(jsonObj.optJSONArray(RESPONSE_TYPES.toString()));
663  Set<String> responseTypes = new HashSet<String>();
664  for (int i = 0; i < jsonObj.getJSONArray(RESPONSE_TYPES.toString()).length(); i++) {
665  responseTypes.add(jsonObj.getJSONArray(RESPONSE_TYPES.toString()).getString(i));
666  }
667  assertTrue(responseTypes
668  .containsAll(Arrays.asList(ResponseType.TOKEN.toString(), ResponseType.ID_TOKEN.toString())));
669  assertTrue(jsonObj.has(REDIRECT_URIS.toString()));
670  assertTrue(jsonObj.has(APPLICATION_TYPE.toString()));
671  assertTrue(jsonObj.has(CLIENT_NAME.toString()));
672  assertTrue(jsonObj.has(ID_TOKEN_SIGNED_RESPONSE_ALG.toString()));
673  assertTrue(jsonObj.has(SCOPE.toString()));
674  } catch (JSONException e) {
675  e.printStackTrace();
676  fail(e.getMessage() + "\nResponse was: " + entity);
677  }
678  }
static String registrationClientUri3
Definition: ResponseTypesRestrictionEmbeddedTest.java:84
static String registrationAccessToken3
Definition: ResponseTypesRestrictionEmbeddedTest.java:83
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ responseTypesTokenIdTokenStep3()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesTokenIdTokenStep3 ( final String  authorizePath,
final String  userId,
final String  userSecret,
final String  redirectUri 
) throws Exception
inline
683  {
684  List<ResponseType> responseTypes = Arrays.asList(ResponseType.TOKEN, ResponseType.ID_TOKEN);
685  List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
686  String nonce = UUID.randomUUID().toString();
687 
688  AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId3, scopes,
689  redirectUri, nonce);
690  authorizationRequest.setState("af0ifjsldkj");
691  authorizationRequest.getPrompts().add(Prompt.NONE);
692  authorizationRequest.setAuthUsername(userId);
693  authorizationRequest.setAuthPassword(userSecret);
694 
695  Builder request = ResteasyClientBuilder.newClient()
696  .target(url.toString() + authorizePath + "?" + authorizationRequest.getQueryString()).request();
697  request.header("Authorization", "Basic " + authorizationRequest.getEncodedCredentials());
698  request.header("Accept", MediaType.TEXT_PLAIN);
699 
700  Response response = request.get();
701  String entity = response.readEntity(String.class);
702 
703  showResponse("responseTypesTokenIdTokenStep3", response, entity);
704 
705  assertEquals(response.getStatus(), 302, "Unexpected response code.");
706  assertNotNull(response.getLocation(), "Unexpected result: " + response.getLocation());
707 
708  if (response.getLocation() != null) {
709  try {
710  URI uri = new URI(response.getLocation().toString());
711  assertNotNull(uri.getFragment(), "Fragment is null");
712 
713  Map<String, String> params = QueryStringDecoder.decode(uri.getFragment());
714 
715  assertNotNull(params.get("access_token"), "The access token is null");
716  assertNotNull(params.get("token_type"), "The token type is null");
717  assertNotNull(params.get("id_token"), "The id token is null");
718  assertNotNull(params.get("state"), "The state is null");
719  } catch (URISyntaxException e) {
720  e.printStackTrace();
721  fail("Response URI is not well formed");
722  }
723  }
724  }
static String clientId3
Definition: ResponseTypesRestrictionEmbeddedTest.java:82
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ responseTypesTokenIdTokenStep4()

void org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesTokenIdTokenStep4 ( final String  authorizePath,
final String  userId,
final String  userSecret,
final String  redirectUri,
final List< ResponseType responseTypes 
) throws Exception
inline

Authorization request with the other Response types combination should fail.

748  {
749  List<String> scopes = Arrays.asList("openid", "profile", "address", "email");
750  String nonce = UUID.randomUUID().toString();
751 
752  AuthorizationRequest authorizationRequest = new AuthorizationRequest(responseTypes, clientId3, scopes,
753  redirectUri, nonce);
754  authorizationRequest.setState("af0ifjsldkj");
755  authorizationRequest.getPrompts().add(Prompt.NONE);
756  authorizationRequest.setAuthUsername(userId);
757  authorizationRequest.setAuthPassword(userSecret);
758 
759  Builder request = ResteasyClientBuilder.newClient()
760  .target(url.toString() + authorizePath + "?" + authorizationRequest.getQueryString()).request();
761  request.header("Authorization", "Basic " + authorizationRequest.getEncodedCredentials());
762  request.header("Accept", MediaType.TEXT_PLAIN);
763 
764  Response response = request.get();
765  String entity = response.readEntity(String.class);
766 
767  showResponse("responseTypesTokenIdTokenStep4", response, entity);
768 
769  if (response.getStatus() == 400) {
770  assertNotNull(entity, "Unexpected result: " + entity);
771  try {
772  JSONObject jsonObj = new JSONObject(entity);
773  assertTrue(jsonObj.has("error"), "The error type is null");
774  assertTrue(jsonObj.has("error_description"), "The error description is null");
775  } catch (JSONException e) {
776  e.printStackTrace();
777  fail(e.getMessage() + "\nResponse was: " + entity);
778  }
779  } else {
780  fail("Unexpected response code: " + response.getStatus());
781  }
782  }
static String clientId3
Definition: ResponseTypesRestrictionEmbeddedTest.java:82
void showResponse(String title, Response response)
Definition: BaseTest.java:30
URI url
Definition: ResponseTypesRestrictionEmbeddedTest.java:68

◆ responseTypesTokenIdTokenStep4DataProvider()

Object [][] org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.responseTypesTokenIdTokenStep4DataProvider ( ITestContext  context)
inline
727  {
728  String authorizePath = context.getCurrentXmlTest().getParameter("authorizePath");
729  String userId = context.getCurrentXmlTest().getParameter("userId");
730  String userSecret = context.getCurrentXmlTest().getParameter("userSecret");
731  String redirectUri = context.getCurrentXmlTest().getParameter("redirectUri");
732 
733  return new Object[][]{{authorizePath, userId, userSecret, redirectUri, Arrays.asList(ResponseType.CODE)},
734  {authorizePath, userId, userSecret, redirectUri,
735  Arrays.asList(ResponseType.CODE, ResponseType.ID_TOKEN)},
736  {authorizePath, userId, userSecret, redirectUri,
737  Arrays.asList(ResponseType.CODE, ResponseType.TOKEN)},
738  {authorizePath, userId, userSecret, redirectUri,
739  Arrays.asList(ResponseType.CODE, ResponseType.TOKEN, ResponseType.ID_TOKEN)},};
740  }

◆ setAuthorizationEndpoint()

void org.xdi.oxauth.BaseTest.setAuthorizationEndpoint ( String  authorizationEndpoint)
inlineinherited
138  {
140  }
String authorizationEndpoint
Definition: BaseTest.java:72

◆ setCheckSessionIFrame()

void org.xdi.oxauth.BaseTest.setCheckSessionIFrame ( String  checkSessionIFrame)
inlineinherited
170  {
172  }
String checkSessionIFrame
Definition: BaseTest.java:78

◆ setClientInfoEndpoint()

void org.xdi.oxauth.BaseTest.setClientInfoEndpoint ( String  clientInfoEndpoint)
inlineinherited
162  {
164  }
String clientInfoEndpoint
Definition: BaseTest.java:77

◆ setConfigurationEndpoint()

void org.xdi.oxauth.BaseTest.setConfigurationEndpoint ( String  configurationEndpoint)
inlineinherited
226  {
228  }
String configurationEndpoint
Definition: BaseTest.java:82

◆ setDriver()

void org.xdi.oxauth.BaseTest.setDriver ( WebDriver  driver)
inlineinherited
130  {
131  this.driver = driver;
132  }
WebDriver driver
Definition: BaseTest.java:70

◆ setEndSessionEndpoint()

void org.xdi.oxauth.BaseTest.setEndSessionEndpoint ( String  endSessionEndpoint)
inlineinherited
178  {
180  }
String endSessionEndpoint
Definition: BaseTest.java:79

◆ setIdGenEndpoint()

void org.xdi.oxauth.BaseTest.setIdGenEndpoint ( String  p_idGenEndpoint)
inlineinherited
218  {
219  idGenEndpoint = p_idGenEndpoint;
220  }
String idGenEndpoint
Definition: BaseTest.java:83

◆ setIntrospectionEndpoint()

void org.xdi.oxauth.BaseTest.setIntrospectionEndpoint ( String  p_introspectionEndpoint)
inlineinherited
202  {
203  introspectionEndpoint = p_introspectionEndpoint;
204  }
String introspectionEndpoint
Definition: BaseTest.java:84

◆ setJwksUri()

void org.xdi.oxauth.BaseTest.setJwksUri ( String  jwksUri)
inlineinherited
186  {
187  this.jwksUri = jwksUri;
188  }
String jwksUri
Definition: BaseTest.java:80

◆ setRegistrationEndpoint()

void org.xdi.oxauth.BaseTest.setRegistrationEndpoint ( String  registrationEndpoint)
inlineinherited
194  {
196  }
String registrationEndpoint
Definition: BaseTest.java:81

◆ setScopeToClaimsMapping()

void org.xdi.oxauth.BaseTest.setScopeToClaimsMapping ( Map< String, List< String >>  p_scopeToClaimsMapping)
inlineinherited
210  {
211  scopeToClaimsMapping = p_scopeToClaimsMapping;
212  }
Map< String, List< String > > scopeToClaimsMapping
Definition: BaseTest.java:85

◆ setTokenEndpoint()

void org.xdi.oxauth.BaseTest.setTokenEndpoint ( String  tokenEndpoint)
inlineinherited
146  {
148  }
String tokenEndpoint
Definition: BaseTest.java:75

◆ setUserInfoEndpoint()

void org.xdi.oxauth.BaseTest.setUserInfoEndpoint ( String  userInfoEndpoint)
inlineinherited
154  {
156  }
String userInfoEndpoint
Definition: BaseTest.java:76

◆ showClient() [1/2]

static void org.xdi.oxauth.BaseTest.showClient ( BaseClient  client)
inlinestaticinherited
775  {
776  ClientUtils.showClient(client);
777  }
Definition: ClientUtils.java:17
static void showClient(BaseClient client)
Definition: ClientUtils.java:21

◆ showClient() [2/2]

static void org.xdi.oxauth.BaseTest.showClient ( BaseClient  client,
CookieStore  cookieStore 
)
inlinestaticinherited
779  {
780  ClientUtils.showClient(client, cookieStore);
781  }
Definition: ClientUtils.java:17
static void showClient(BaseClient client)
Definition: ClientUtils.java:21

◆ showClientUserAgent()

static void org.xdi.oxauth.BaseTest.showClientUserAgent ( BaseClient  client)
inlinestaticinherited
783  {
785  }
Definition: ClientUtils.java:17
static void showClientUserAgent(BaseClient client)
Definition: ClientUtils.java:35

◆ showEntity()

void org.xdi.oxauth.BaseTest.showEntity ( String  entity)
inlineinherited
769  {
770  if (entity != null) {
771  System.out.println("Entity: " + entity.replace("\\n", "\n"));
772  }
773  }

◆ showResponse() [1/2]

void org.xdi.oxauth.BaseTest.showResponse ( String  title,
Response  response 
)
inlineinherited
30  {
31  showResponse(title, response, null);
32  }
void showResponse(String title, Response response)
Definition: BaseTest.java:30

◆ showResponse() [2/2]

static void org.xdi.oxauth.BaseTest.showResponse ( String  title,
Response  response,
Object  entity 
)
inlinestaticinherited
34  {
35  System.out.println(" ");
36  System.out.println("RESPONSE FOR: " + title);
37  System.out.println(response.getStatus());
38  for (Entry<String, List<Object>> headers : response.getHeaders().entrySet()) {
39  String headerName = headers.getKey();
40  System.out.println(headerName + ": " + headers.getValue());
41  }
42 
43  if (entity != null) {
44  System.out.println(entity.toString().replace("\\n", "\n"));
45  }
46  System.out.println(" ");
47  System.out.println("Status message: " + response.getStatus());
48  }

◆ showTitle() [1/2]

void org.xdi.oxauth.BaseTest.showTitle ( String  title)
inlineinherited
22  {
23  title = "TEST: " + title;
24 
25  System.out.println("#######################################################");
26  System.out.println(title);
27  System.out.println("#######################################################");
28  }

◆ showTitle() [2/2]

void org.xdi.oxauth.BaseTest.showTitle ( String  title)
inlineinherited
761  {
762  title = "TEST: " + title;
763 
764  System.out.println("#######################################################");
765  System.out.println(title);
766  System.out.println("#######################################################");
767  }

◆ startSelenium()

void org.xdi.oxauth.BaseTest.startSelenium ( )
inlineinherited
230  {
231  //System.setProperty("webdriver.chrome.driver", "/Users/JAVIER/tmp/chromedriver");
232  //driver = new ChromeDriver();
233 
234  //driver = new SafariDriver();
235 
236  //driver = new FirefoxDriver();
237 
238  //driver = new InternetExplorerDriver();
239 
240  driver = new HtmlUnitDriver(true);
241  }
WebDriver driver
Definition: BaseTest.java:70

◆ stopSelenium()

void org.xdi.oxauth.BaseTest.stopSelenium ( )
inlineinherited
243  {
244 // driver.close();
245  driver.quit();
246  }
WebDriver driver
Definition: BaseTest.java:70

◆ waitForResourceOwnerAndGrantLoginForm() [1/2]

String org.xdi.oxauth.BaseTest.waitForResourceOwnerAndGrantLoginForm ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest,
boolean  cleanupCookies 
)
inlineinherited

Try to open login form (via the user-agent)

617  {
618  String authorizationRequestUrl = authorizeUrl + "?" + authorizationRequest.getQueryString();
619 
620  AuthorizeClient authorizeClient = new AuthorizeClient(authorizeUrl);
621  authorizeClient.setRequest(authorizationRequest);
622 
623  System.out.println("waitForResourceOwnerAndGrantLoginForm: authorizationRequestUrl:" + authorizationRequestUrl);
624  startSelenium();
625  if (cleanupCookies) {
626  System.out.println("waitForResourceOwnerAndGrantLoginForm: Cleaning cookies");
628  }
629  driver.navigate().to(authorizationRequestUrl);
630 
631  WebElement usernameElement = driver.findElement(By.name(loginFormUsername));
632  WebElement passwordElement = driver.findElement(By.name(loginFormPassword));
633  WebElement loginButton = driver.findElement(By.name(loginFormLoginButton));
634 
635  if ((usernameElement == null) || (passwordElement == null) || (loginButton == null)) {
636  return null;
637  }
638 
639  Cookie sessionStateCookie = driver.manage().getCookieNamed("session_state");
640  String sessionState = null;
641  if (sessionStateCookie != null) {
642  sessionState = sessionStateCookie.getValue();
643  }
644  System.out.println("waitForResourceOwnerAndGrantLoginForm: sessionState:" + sessionState);
645 
646  stopSelenium();
647 
648  showClientUserAgent(authorizeClient);
649 
650  return sessionState;
651  }
String loginFormUsername
Definition: BaseTest.java:88
String loginFormPassword
Definition: BaseTest.java:89
void deleteAllCookies()
Definition: BaseTest.java:661
void stopSelenium()
Definition: BaseTest.java:243
Definition: AuthorizeClient.java:29
void startSelenium()
Definition: BaseTest.java:230
String loginFormLoginButton
Definition: BaseTest.java:90
void setRequest(T request)
Definition: BaseClient.java:68
WebDriver driver
Definition: BaseTest.java:70
String getQueryString()
Definition: AuthorizationRequest.java:486
static void showClientUserAgent(BaseClient client)
Definition: BaseTest.java:783

◆ waitForResourceOwnerAndGrantLoginForm() [2/2]

String org.xdi.oxauth.BaseTest.waitForResourceOwnerAndGrantLoginForm ( String  authorizeUrl,
AuthorizationRequest  authorizationRequest 
)
inlineinherited

Try to open login form (via the user-agent)

657  {
658  return waitForResourceOwnerAndGrantLoginForm(authorizeUrl, authorizationRequest, true);
659  }
String waitForResourceOwnerAndGrantLoginForm(String authorizeUrl, AuthorizationRequest authorizationRequest, boolean cleanupCookies)
Definition: BaseTest.java:616

メンバ詳解

◆ authorizationCode1

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.authorizationCode1
staticprivate

◆ authorizationCode2

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.authorizationCode2
staticprivate

◆ authorizationEndpoint

String org.xdi.oxauth.BaseTest.authorizationEndpoint
protectedinherited

◆ authorizationPageEndpoint

String org.xdi.oxauth.BaseTest.authorizationPageEndpoint
protectedinherited

◆ checkSessionIFrame

String org.xdi.oxauth.BaseTest.checkSessionIFrame
protectedinherited

◆ clientId1

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.clientId1
staticprivate

◆ clientId2

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.clientId2
staticprivate

◆ clientId3

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.clientId3
staticprivate

◆ clientInfoEndpoint

String org.xdi.oxauth.BaseTest.clientInfoEndpoint
protectedinherited

◆ clientSecret1

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.clientSecret1
staticprivate

◆ clientSecret2

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.clientSecret2
staticprivate

◆ configurationEndpoint

String org.xdi.oxauth.BaseTest.configurationEndpoint
protectedinherited

◆ driver

WebDriver org.xdi.oxauth.BaseTest.driver
protectedinherited

◆ endSessionEndpoint

String org.xdi.oxauth.BaseTest.endSessionEndpoint
protectedinherited

◆ gluuConfigurationEndpoint

String org.xdi.oxauth.BaseTest.gluuConfigurationEndpoint
protectedinherited

◆ idGenEndpoint

String org.xdi.oxauth.BaseTest.idGenEndpoint
protectedinherited

◆ introspectionEndpoint

String org.xdi.oxauth.BaseTest.introspectionEndpoint
protectedinherited

◆ jwksUri

String org.xdi.oxauth.BaseTest.jwksUri
protectedinherited

◆ registrationAccessToken1

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.registrationAccessToken1
staticprivate

◆ registrationAccessToken2

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.registrationAccessToken2
staticprivate

◆ registrationAccessToken3

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.registrationAccessToken3
staticprivate

◆ registrationClientUri1

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.registrationClientUri1
staticprivate

◆ registrationClientUri2

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.registrationClientUri2
staticprivate

◆ registrationClientUri3

String org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.registrationClientUri3
staticprivate

◆ registrationEndpoint

String org.xdi.oxauth.BaseTest.registrationEndpoint
protectedinherited

◆ scopeToClaimsMapping

Map<String, List<String> > org.xdi.oxauth.BaseTest.scopeToClaimsMapping
protectedinherited

◆ testData

FileConfiguration org.xdi.oxauth.ConfigurableTest.testData
staticinherited

◆ tokenEndpoint

String org.xdi.oxauth.BaseTest.tokenEndpoint
protectedinherited

◆ url

URI org.xdi.oxauth.ws.rs.ResponseTypesRestrictionEmbeddedTest.url
private

◆ userInfoEndpoint

String org.xdi.oxauth.BaseTest.userInfoEndpoint
protectedinherited

このクラス詳解は次のファイルから抽出されました: