Package org.astrogrid.samp.web
Class ExtremeSwingClientAuthorizer
- java.lang.Object
-
- org.astrogrid.samp.web.ExtremeSwingClientAuthorizer
-
- All Implemented Interfaces:
ClientAuthorizer
public class ExtremeSwingClientAuthorizer extends java.lang.Object implements ClientAuthorizer
Client authorizer implementaion that does its very best to discourage users from accepting regitrations.- Since:
- 29 Sep 2011
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Component
parent_
-
Constructor Summary
Constructors Constructor Description ExtremeSwingClientAuthorizer(java.awt.Component parent)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authorize(HttpServer.Request request, java.lang.String appName)
Indicates whether an HTTP request representing an otherwise unauthorized connection attempt will be permitted access to sensitive system resources.private javax.swing.border.Border
createBorder(boolean highlight)
Returns a new border of fixed dimensions which may or may not include an element of highlighting.
-
-
-
Method Detail
-
authorize
public boolean authorize(HttpServer.Request request, java.lang.String appName)
Description copied from interface:ClientAuthorizer
Indicates whether an HTTP request representing an otherwise unauthorized connection attempt will be permitted access to sensitive system resources. The client submitting the request provides theappName
parameter by way of additional information about its identity. However, the value of this name is supplied by the (potentially malicious) applicant, so cannot in itself be regarded as an additional security measure.- Specified by:
authorize
in interfaceClientAuthorizer
- Parameters:
request
- incoming HTTP requestappName
- name by which the application submitting the request wishes to be known- Returns:
- true iff submitter of the request should be permitted access to sensitive system resources in the future
-
createBorder
private javax.swing.border.Border createBorder(boolean highlight)
Returns a new border of fixed dimensions which may or may not include an element of highlighting.- Parameters:
highlight
- true to highlight border- Returns:
- new border
-
-