Class CORSInterceptor.Origin

java.lang.Object
io.inverno.mod.security.http.cors.CORSInterceptor.Origin
Enclosing class:
CORSInterceptor<A extends ExchangeContext,B extends Exchange<A>>

protected static class CORSInterceptor.Origin extends Object

Represents an origin composed of a scheme, a host and a port.

Since:
1.5
Author:
Jeremy Kuhn
  • Field Details

    • scheme

      protected final String scheme
      The scheme.
    • host

      protected final String host
      The host.
    • port

      protected final int port
      The port.
    • value

      protected final String value
      The origin value ([scheme]://[host]:[port]).
  • Constructor Details

  • Method Details

    • getDefaultPort

      public static Integer getDefaultPort(String scheme)

      Returns the default port from the specified scheme.

      Parameters:
      scheme - a scheme
      Returns:
      the default port corresponding to the scheme or -1
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object