Package net.openid.appauth.browser
Class VersionedBrowserMatcher
- java.lang.Object
-
- net.openid.appauth.browser.VersionedBrowserMatcher
-
- All Implemented Interfaces:
BrowserMatcher
public class VersionedBrowserMatcher extends Object implements BrowserMatcher
Matches a browser based on its package name, set of signatures, version and whether it is being used as a custom tab.This can be used as part of a browser allowList or denyList.
-
-
Field Summary
Fields Modifier and Type Field Description static VersionedBrowserMatcher
CHROME_BROWSER
Matches any version of Google Chrome for use as a standalone browser.static VersionedBrowserMatcher
CHROME_CUSTOM_TAB
Matches any version of Chrome for use as a custom tab.static VersionedBrowserMatcher
FIREFOX_BROWSER
Matches any version of Mozilla Firefox.static VersionedBrowserMatcher
FIREFOX_CUSTOM_TAB
Matches any version of Firefox for use as a custom tab.static VersionedBrowserMatcher
SAMSUNG_BROWSER
Matches any version of SBrowser for use as a standalone browser.static VersionedBrowserMatcher
SAMSUNG_CUSTOM_TAB
Matches any version of SBrowser for use as a custom tab.
-
Constructor Summary
Constructors Constructor Description VersionedBrowserMatcher(String packageName, String signatureHash, boolean usingCustomTab, VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, single signature hash, custom tab usage mode, and a version range.VersionedBrowserMatcher(String packageName, Set<String> signatureHashes, boolean usingCustomTab, VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, set of signature hashes, custom tab usage mode, and a version range.
-
-
-
Field Detail
-
CHROME_CUSTOM_TAB
public static final VersionedBrowserMatcher CHROME_CUSTOM_TAB
Matches any version of Chrome for use as a custom tab.
-
CHROME_BROWSER
public static final VersionedBrowserMatcher CHROME_BROWSER
Matches any version of Google Chrome for use as a standalone browser.
-
FIREFOX_CUSTOM_TAB
public static final VersionedBrowserMatcher FIREFOX_CUSTOM_TAB
Matches any version of Firefox for use as a custom tab.
-
FIREFOX_BROWSER
public static final VersionedBrowserMatcher FIREFOX_BROWSER
Matches any version of Mozilla Firefox.
-
SAMSUNG_BROWSER
public static final VersionedBrowserMatcher SAMSUNG_BROWSER
Matches any version of SBrowser for use as a standalone browser.
-
SAMSUNG_CUSTOM_TAB
public static final VersionedBrowserMatcher SAMSUNG_CUSTOM_TAB
Matches any version of SBrowser for use as a custom tab.
-
-
Constructor Detail
-
VersionedBrowserMatcher
public VersionedBrowserMatcher(@NonNull String packageName, @NonNull String signatureHash, boolean usingCustomTab, @NonNull VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, single signature hash, custom tab usage mode, and a version range.
-
VersionedBrowserMatcher
public VersionedBrowserMatcher(@NonNull String packageName, @NonNull Set<String> signatureHashes, boolean usingCustomTab, @NonNull VersionRange versionRange)
Creates a browser matcher that requires an exact match on package name, set of signature hashes, custom tab usage mode, and a version range.
-
-
Method Detail
-
matches
public boolean matches(@NonNull BrowserDescriptor descriptor)
- Specified by:
matches
in interfaceBrowserMatcher
- Returns:
- true if the browser matches some set of criteria.
-
-