Package io.milton.ftp

Class NameAndAuthority

java.lang.Object
io.milton.ftp.NameAndAuthority

public class NameAndAuthority extends Object
Parse a string into three components - username - domain - authority The domain field is to support servers which serve multiple domains, where the user list is defined per domain. The authority field is to support hierarchies of domains, where the user from an owning domain will get access to child domains
Author:
brad
  • Field Details

    • DELIM_HOST

      public static final String DELIM_HOST
      See Also:
    • DELIM_AUTHORITY

      public static final String DELIM_AUTHORITY
      See Also:
    • name

      public final String name
      The username part. E.g. brad
    • domain

      public final String domain
      The domain they are logging into. Optional. E.g. milton.ettrema.com
    • authority

      public final String authority
      The name of the authority which grants access. Optional E.g. www.ettrema.com This is typically a domain which owns the domain being logged into. If not given explicitly defaults to the domain
  • Constructor Details

    • NameAndAuthority

      public NameAndAuthority(String name)
    • NameAndAuthority

      public NameAndAuthority(String name, String authority, String domain)
  • Method Details

    • parse

      public static NameAndAuthority parse(String user)
      Valid forms: joe - domain and authority are null joe#www.joe.com - domain and authority are 'www.joe.com' joe#admin.joe.com:www.joes-client.com - authority is 'admin.joe.com', domain is 'www.joes-client.com'
      Parameters:
      user - - a string in one of the above forms
      Returns:
    • toMilton

      public String toMilton()