gluu
公開メンバ関数 | 非公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.xdi.oxauth.service.fido.u2f.ApplicationService クラス
org.xdi.oxauth.service.fido.u2f.ApplicationService 連携図
Collaboration graph

公開メンバ関数

boolean isValidateApplication ()
 
void checkIsValid (String appId)
 

非公開メンバ関数

void checkPathIsNotSlash (URI url)
 
URI checkValidUrl (String appId)
 
void checkNotIpAddress (URI url)
 

非公開変数類

boolean validateApplication = true
 

詳解

Provides operations with U2F applications

著者
Yuriy Movchan Date: 05/19/2015

関数詳解

◆ checkIsValid()

void org.xdi.oxauth.service.fido.u2f.ApplicationService.checkIsValid ( String  appId)
inline

Throws BadConfigurationException if the given App ID is found to be incompatible with the U2F specification or any major U2F Client implementation.

引数
appIdthe App ID to be validated
41  {
42  if (!appId.contains(":")) {
43  throw new BadConfigurationException("App ID does not look like a valid facet or URL. Web facets must start with 'https://'.");
44  }
45 
46  if (appId.startsWith("http:")) {
47  throw new BadConfigurationException("HTTP is not supported for App IDs. Use HTTPS instead.");
48  }
49 
50  if (appId.startsWith("https://")) {
51  URI url = checkValidUrl(appId);
53 // checkNotIpAddress(url);
54  }
55  }
URI checkValidUrl(String appId)
Definition: ApplicationService.java:64
void checkPathIsNotSlash(URI url)
Definition: ApplicationService.java:57

◆ checkNotIpAddress()

void org.xdi.oxauth.service.fido.u2f.ApplicationService.checkNotIpAddress ( URI  url)
inlineprivate
74  {
75  if (InetAddressUtility.isIpAddress(url.getAuthority()) || (url.getHost() != null && InetAddressUtility.isIpAddress(url.getHost()))) {
76  throw new BadConfigurationException("App ID must not be an IP-address, since it is not supported. Use a host name instead.");
77  }
78  }

◆ checkPathIsNotSlash()

void org.xdi.oxauth.service.fido.u2f.ApplicationService.checkPathIsNotSlash ( URI  url)
inlineprivate
57  {
58  if ("/".equals(url.getPath())) {
59  throw new BadConfigurationException(
60  "The path of the URL set as App ID is '/'. This is probably not what you want -- remove the trailing slash of the App ID URL.");
61  }
62  }

◆ checkValidUrl()

URI org.xdi.oxauth.service.fido.u2f.ApplicationService.checkValidUrl ( String  appId)
inlineprivate
64  {
65  URI url = null;
66  try {
67  url = new URI(appId);
68  } catch (URISyntaxException e) {
69  throw new BadConfigurationException("App ID looks like a HTTPS URL, but has syntax errors.", e);
70  }
71  return url;
72  }

◆ isValidateApplication()

boolean org.xdi.oxauth.service.fido.u2f.ApplicationService.isValidateApplication ( )
inline
29  {
30  return validateApplication;
31  }
boolean validateApplication
Definition: ApplicationService.java:27

メンバ詳解

◆ validateApplication

boolean org.xdi.oxauth.service.fido.u2f.ApplicationService.validateApplication = true
private

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