Debian Codegraph @

src/java/org/astrogrid/samp/web/OriginAuthorizer.java

raw
1 package org.astrogrid.samp.web;
2
3 /**
4 * Controls which origins are authorized to perform cross-origin access
5 * to resources.
6 *
7 * @author Mark Taylor
8 * @since 2 Feb 2011
9 */
10 public interface OriginAuthorizer {
11
12 /**
13 * Indicates whether a client with a given origin is permitted
14 * to access resources.
15 *
16 * @param origin client Origin
17 * @return true iff access is permitted
18 * @see <a href="http://tools.ietf.org/html/draft-abarth-origin"
19 * >Web Origin concept</a>
20 */
21 boolean authorize( String origin );
22
23 /**
24 * Indicates whether clients from arbitrary origins (including none)
25 * are permitted to access resources.
26 *
27 * @return true iff access is permitted
28 */
29 boolean authorizeAll();
30 }