Class UserNamePassword

java.lang.Object
edu.suffolk.litlab.efsp.server.auth.UserNamePassword
All Implemented Interfaces:
UserCreds

public class UserNamePassword extends Object implements UserCreds
A class that handles authentication to an external server by simply accepting a user's username and password, separated by a colon in a header.

Only Tyler is silly enough to do this though, so practically this is just theirs.

  • Constructor Details

    • UserNamePassword

      public UserNamePassword()
    • UserNamePassword

      public UserNamePassword(String userName, String password)
  • Method Details

    • userCredsFromAuthorization

      public static Optional<UserCreds> userCredsFromAuthorization(String userColonPassword)
    • getUserName

      public String getUserName()
      Description copied from interface: UserCreds
      The user's identifiable name (in Tyler this is an email).
      Specified by:
      getUserName in interface UserCreds
    • toHeaders

      public List<org.apache.cxf.headers.Header> toHeaders()
      Specified by:
      toHeaders in interface UserCreds
      Returns:
      the user's credentials in the form of a SOAP header.
    • makeHeaderList

      public static List<org.apache.cxf.headers.Header> makeHeaderList(AuthenticateResponseType authRes)
      Convenience method to make the Tyler specific SOAP Header.
      Parameters:
      AuthenticateResponseType - authRes the response from the server if the user is authenticated.
      Returns:
      the Header object to the request context's Header.HEADER_LIST