Class Directory


  • public class Directory
    extends Object
    Stores user, group and application information in the Yamcs database.
    • Method Detail

      • addServiceAccount

        public ApplicationCredentials addServiceAccount​(ServiceAccount service)
                                                 throws IOException
        Creates a new service account. The service account is assumed to represent one application only, for which automatically generated credentials are returned. These may be used to identify as that application, for example to generate access tokens.
        Throws:
        IOException
      • validateUserPassword

        public boolean validateUserPassword​(String username,
                                            char[] password)
        Validates the provided password against the stored password hash of a user.
      • validateApplicationPassword

        public boolean validateApplicationPassword​(String applicationId,
                                                   char[] password)
        Validates the provided password against the stored password hash of an application.

        Currently this is only functional for service accounts (which map to one and only one application), but some day we may also want to support user applications.

      • getUser

        public User getUser​(int id)
      • getUser

        public User getUser​(String username)
      • getUsers

        public List<User> getUsers()
      • getAccountForApplication

        public Account getAccountForApplication​(String applicationId)
      • getRoles

        public List<Role> getRoles()