Record Class BlueMindAccount
java.lang.Object
java.lang.Record
org.exoplatform.bluemind.client.model.BlueMindAccount
- Record Components:
apiRoot- any address on the server — only its scheme, host and port are ever used, the client appends/apiitself and never a path the caller nameslogin- the BlueMind login; an alias is fine, BlueMind resolves it (latd)password- the directory password, or a session id — both mint a sessionorigin- what eXo names itself as in BlueMind's login audit (exo-caldav,exo-platform, …)
public record BlueMindAccount(URI apiRoot, String login, String password, String origin)
extends Record
Where and as whom a BlueMind session is opened: values the consumer resolved
from its own credentials, never a type of the consumer's (it replaces the
calendar side's
CalDavEndpoint + CaldavCredentialsResolver
pair and the credentials provider's three strings).
toString() never names the password: a record's generated one would
put it in any log line or exception message the account reaches.
-
Constructor Summary
ConstructorsConstructorDescriptionBlueMindAccount(URI apiRoot, String login, String password, String origin) Creates an instance of aBlueMindAccountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapiRoot()Returns the value of theapiRootrecord component.final booleanIndicates whether some other object is "equal to" this one.static BlueMindAccountfromBasicAuthorization(URI apiRoot, String authorization, String origin) The account a Basic authorization header carries — how the calendar side has always obtained its login and password from the configured credentials provider (BlueMindRestSession.accountOf).final inthashCode()Returns a hash code value for this object.login()Returns the value of theloginrecord component.origin()Returns the value of theoriginrecord component.password()Returns the value of thepasswordrecord component.toString()Names the account without ever naming its password — safe in logs.
-
Constructor Details
-
Method Details
-
fromBasicAuthorization
public static BlueMindAccount fromBasicAuthorization(URI apiRoot, String authorization, String origin) The account a Basic authorization header carries — how the calendar side has always obtained its login and password from the configured credentials provider (BlueMindRestSession.accountOf). Only the first colon separates: a password may hold more.- Parameters:
apiRoot- any address on the serverauthorization- the header value,Basic <base64(login:password)>origin- what eXo names itself as in BlueMind's login audit- Returns:
- the account
- Throws:
UnsupportedOperationException- when the header is not a Basic login and password — no other material is a login this API takes
-
toString
Names the account without ever naming its password — safe in logs. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
apiRoot
Returns the value of theapiRootrecord component.- Returns:
- the value of the
apiRootrecord component
-
login
Returns the value of theloginrecord component.- Returns:
- the value of the
loginrecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-