Module io.inverno.mod.security.http
Class CORSInterceptor.Origin
java.lang.Object
io.inverno.mod.security.http.cors.CORSInterceptor.Origin
- Enclosing class:
CORSInterceptor<A extends ExchangeContext,
B extends Exchange<A>>
Represents an origin composed of a scheme, a host and a port.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
scheme
The scheme. -
host
The host. -
port
protected final int portThe port. -
value
The origin value ([scheme]://[host]:[port]
).
-
-
Constructor Details
-
Origin
Creates an origin by parsing the specified origin string.
- Parameters:
origin
- the origin- Throws:
IllegalArgumentException
- if the specified origin is invalid
-
Origin
Creates an origin with the specified scheme, host and port.
- Parameters:
scheme
- a schemehost
- a hostport
- a port- Throws:
IllegalArgumentException
- if the specified parameters are invalid
-
-
Method Details
-
getDefaultPort
Returns the default port from the specified scheme.
- Parameters:
scheme
- a scheme- Returns:
- the default port corresponding to the scheme or -1
-
toString
-
hashCode
public int hashCode() -
equals
-