Package net.openid.appauth.browser
Class BrowserAllowList
- java.lang.Object
-
- net.openid.appauth.browser.BrowserAllowList
-
- All Implemented Interfaces:
BrowserMatcher
public class BrowserAllowList extends Object implements BrowserMatcher
A allowList of browsers which can be used as part of an authorization flows.Examples:
// only allow Chrome, and only as a standalone browser new BrowserAllowList(VersionedBrowserMatcher.CHROME_BROWSER); // allow Chrome custom tabs only, but exclude a version range new BrowserAllowList( new VersionedBrowserMatcher( Browsers.Chrome.PACKAGE_NAME, Browsers.Chrome.SIGNATURE_SET, true, VersionRange.atMost("45.1")), new VersionedBrowserMatcher( Browsers.Chrome.PACKAGE_NAME, Browsers.Chrome.SIGNATURE_SET, true, VersionRange.atLeast("45.3"));
-
-
Constructor Summary
Constructors Constructor Description BrowserAllowList(BrowserMatcher... matchers)
Creates a browser allowList, which will match if any of the provided matchers do.
-
-
-
Constructor Detail
-
BrowserAllowList
public BrowserAllowList(BrowserMatcher... matchers)
Creates a browser allowList, which will match if any of the provided matchers do.
-
-
Method Detail
-
matches
public boolean matches(@NonNull BrowserDescriptor descriptor)
- Specified by:
matches
in interfaceBrowserMatcher
- Returns:
- true if the browser matches some set of criteria.
-
-