edu.ucsb.nceas.metacat

## Interface AuthInterface

- All Known Implementing Classes:
    AuthFile, AuthLdap, AuthStub, AuthTest

      public interface AuthInterface

  An interface representing the methods that should be implemented by an authentication service. The authentication service is used to determine if a user is authenticated, and whether they are a member of a particular group.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static short` | `GROUPDESINDEX`
    `static short` | `GROUPNAMEINDEX`
    `static short` | `USERCNINDEX`
    `static short` | `USERDNINDEX`
    `static short` | `USEREMAILINDEX`
    `static short` | `USERINFOCNINDEX`
    `static short` | `USERINFOEMAILINDEX`
    `static short` | `USERINFOORGANIDEX`
    `static short` | `USERORGINDEX`
    `static short` | `USERORGUNITINDEX`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `authenticate(java.lang.String user, java.lang.String password)` Determine if a user/password are valid according to the authentication service.
    `java.util.HashMap<java.lang.String,java.util.Vector<java.lang.String>>` | `getAttributes(java.lang.String foruser)` Get attributes describing a user or group
    `java.util.HashMap<java.lang.String,java.util.Vector<java.lang.String>>` | `getAttributes(java.lang.String user, java.lang.String password, java.lang.String foruser)` Get attributes describing a user or group
    `java.lang.String[][]` | `getGroups(java.lang.String user, java.lang.String password)` Get all groups from the authentication service
    `java.lang.String[][]` | `getGroups(java.lang.String user, java.lang.String password, java.lang.String foruser)` Get the groups for a particular user from the authentication service
    `java.lang.String` | `getPrincipals(java.lang.String user, java.lang.String password)` Get all groups and users from authentication service.
    `java.lang.String[]` | `getUserInfo(java.lang.String user, java.lang.String password)` Get information for a user - name, organization and email address.
    `java.lang.String[][]` | `getUsers(java.lang.String user, java.lang.String password)` Get all users from the authentication service
    `java.lang.String[]` | `getUsers(java.lang.String user, java.lang.String password, java.lang.String group)` Get the users for a particular group from the authentication service

- - ### Field Detail

    - #### USERDNINDEX

          static final short USERDNINDEX

      See Also:
        Constant Field Values

    - #### USERCNINDEX

          static final short USERCNINDEX

      See Also:
        Constant Field Values

    - #### USERORGINDEX

          static final short USERORGINDEX

      See Also:
        Constant Field Values

    - #### USERORGUNITINDEX

          static final short USERORGUNITINDEX

      See Also:
        Constant Field Values

    - #### USEREMAILINDEX

          static final short USEREMAILINDEX

      See Also:
        Constant Field Values

    - #### GROUPNAMEINDEX

          static final short GROUPNAMEINDEX

      See Also:
        Constant Field Values

    - #### GROUPDESINDEX

          static final short GROUPDESINDEX

      See Also:
        Constant Field Values

    - #### USERINFOCNINDEX

          static final short USERINFOCNINDEX

      See Also:
        Constant Field Values

    - #### USERINFOORGANIDEX

          static final short USERINFOORGANIDEX

      See Also:
        Constant Field Values

    - #### USERINFOEMAILINDEX

          static final short USERINFOEMAILINDEX

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### authenticate

          boolean authenticate(java.lang.String user,
                               java.lang.String password)
                        throws java.net.ConnectException

      Determine if a user/password are valid according to the authentication service.
      Parameters:
        `user` - the name of the principal to authenticate
        `password` - the password to use for authentication
      Throws:
        `java.net.ConnectException`

    - #### getUsers

          java.lang.String[][] getUsers(java.lang.String user,
                                        java.lang.String password)
                                 throws java.net.ConnectException

      Get all users from the authentication service
      Throws:
        `java.net.ConnectException`

    - #### getUserInfo

          java.lang.String[] getUserInfo(java.lang.String user,
                                         java.lang.String password)
                                  throws java.net.ConnectException

      Get information for a user - name, organization and email address.
      Throws:
        `java.net.ConnectException`

    - #### getUsers

          java.lang.String[] getUsers(java.lang.String user,
                                      java.lang.String password,
                                      java.lang.String group)
                               throws java.net.ConnectException

      Get the users for a particular group from the authentication service
      Throws:
        `java.net.ConnectException`

    - #### getGroups

          java.lang.String[][] getGroups(java.lang.String user,
                                         java.lang.String password)
                                  throws java.net.ConnectException

      Get all groups from the authentication service
      Throws:
        `java.net.ConnectException`

    - #### getGroups

          java.lang.String[][] getGroups(java.lang.String user,
                                         java.lang.String password,
                                         java.lang.String foruser)
                                  throws java.net.ConnectException

      Get the groups for a particular user from the authentication service
      Throws:
        `java.net.ConnectException`

    - #### getAttributes

          java.util.HashMap<java.lang.String,java.util.Vector<java.lang.String>> getAttributes(java.lang.String foruser)
                                                                                        throws java.net.ConnectException

      Get attributes describing a user or group
      Parameters:
        `user` - the user for which the attribute list is requested
      Throws:
        `java.net.ConnectException`

    - #### getAttributes

          java.util.HashMap<java.lang.String,java.util.Vector<java.lang.String>> getAttributes(java.lang.String user,
                                                                                               java.lang.String password,
                                                                                               java.lang.String foruser)
                                                                                        throws java.net.ConnectException

      Get attributes describing a user or group
      Parameters:
        `user` - the user for which the attribute list is requested
        `authuser` - the user for authenticating against the service
        `password` - the password for authenticating against the service
      Throws:
        `java.net.ConnectException`

    - #### getPrincipals

          java.lang.String getPrincipals(java.lang.String user,
                                         java.lang.String password)
                                  throws java.net.ConnectException

      Get all groups and users from authentication service. The output is formatted in XML.
      Parameters:
        `user` - the user which requests the information
        `password` - the user's password
      Throws:
        `java.net.ConnectException`

Copyright © 2020 Regents of the University of California. All Rights Reserved.