Class UserCredentials

java.lang.Object
org.gcube.documentstore.security.credentials.UserCredentials
All Implemented Interfaces:
org.gcube.common.security.credentials.Credentials, DocumentStoreCredential

public class UserCredentials extends Object implements DocumentStoreCredential
The UserCredentials class implements the Credentials interface and represents user credentials with a username and password.

This class ensures that both username and password are not null or empty using the @NotNull and @NotEmpty annotations.

It provides getter and setter methods for the username and password fields, and overrides the hashCode, equals, and toString methods from the Object class.

The equals method compares the current object with another object to check for equality based on the username and password fields.

The hashCode method generates a hash code for the object based on the username and password fields.

The toString method returns a string representation of the object, including the class name and the values of the username and password fields.

Example usage:

 
 UserCredentials credentials = new UserCredentials();
 credentials.setUsername("user123");
 credentials.setPassword("pass123");
 
 
Author:
Luca
  • Constructor Details

    • UserCredentials

      public UserCredentials()
  • Method Details