Class AppIdentityRegistry
java.lang.Object
com.linecorp.centraldogma.server.metadata.AppIdentityRegistry
- All Implemented Interfaces:
HasWeight
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty instance.AppIdentityRegistry(Map<String, AppIdentity> appIds, Map<String, String> secrets, @Nullable Map<String, String> certificateIds) Creates a new instance with the given appIDs, secrets, and certificateIds. -
Method Summary
Modifier and TypeMethodDescriptionappIds()Returns the app identities.Returns the certificate IDs.findByCertificateId(String certificateId) Returns theCertificateAppIdentitythat corresponds to the specified certificate ID.@Nullable CertificateAppIdentityfindByCertificateIdOrDefault(String certificateId, @Nullable CertificateAppIdentity defaultValue) Returns theCertificateAppIdentitythat corresponds to the specified certificate ID.findBySecret(String secret) Returns theTokenthat corresponds to the specified secret.@Nullable TokenfindBySecretOrDefault(String secret, @Nullable Token defaultValue) Returns theTokenthat corresponds to the specified secret.Returns theAppIdentitythat corresponds to the specified application ID.@Nullable AppIdentitygetOrDefault(String appId, @Nullable AppIdentity defaultValue) Returns theAppIdentitythat corresponds to the specified application ID.static booleanisValidSecret(@Nullable String secret) Returnstrueif the specified secret is valid.secrets()Returns the secrets.toString()static voidvalidateSecret(String secret) Throws anIllegalArgumentExceptionif the specified secret is not valid.intweight()Returns the weight of this object.Returns a newAppIdentityRegistrywhich does not contain any secrets.
-
Constructor Details
-
AppIdentityRegistry
public AppIdentityRegistry()Creates a new empty instance. -
AppIdentityRegistry
-
-
Method Details
-
appIds
Returns the app identities. -
secrets
-
certificateIds
-
get
Returns theAppIdentitythat corresponds to the specified application ID. -
getOrDefault
Returns theAppIdentitythat corresponds to the specified application ID.defaultValueis returned if there's no such app identity. -
findBySecret
-
findBySecretOrDefault
-
findByCertificateId
Returns theCertificateAppIdentitythat corresponds to the specified certificate ID. -
findByCertificateIdOrDefault
public @Nullable CertificateAppIdentity findByCertificateIdOrDefault(String certificateId, @Nullable CertificateAppIdentity defaultValue) Returns theCertificateAppIdentitythat corresponds to the specified certificate ID.defaultValueis returned if there's no such certificate ID. -
withoutSecret
Returns a newAppIdentityRegistrywhich does not contain any secrets. -
weight
-
toString
-
isValidSecret
Returnstrueif the specified secret is valid. -
validateSecret
Throws anIllegalArgumentExceptionif the specified secret is not valid.
-