Record Class SocialProperties.Provider
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.api.web.social.SocialProperties.Provider
- Record Components:
clientId- client id registered with the provider; blank leaves the provider disabled.clientSecret- client secret (Google, Microsoft, GitHub), supplied from the environment.trustMfa- whether the provider'samrclaim is trusted to prove several factors (defaultfalse).tenant- Entra ID tenant:common(the default),organizations,consumers, or a tenant id or domain.allowedTenants- tenant ids an Entra ID multi-tenant sign-in is limited to; empty accepts any tenant.teamId- Apple developer team id.keyId- id of the Apple key the client secret is signed with.privateKey- PKCS#8 PEM private key (ES256) Apple issued, supplied from the environment; a literal\nstands for a line break.clientSecretTtl- lifetime of the client secret JWT sent to Apple (default five minutes, at most six months).
- Enclosing class:
SocialProperties
public static record SocialProperties.Provider(String clientId, String clientSecret, boolean trustMfa, String tenant, List<String> allowedTenants, String teamId, String keyId, String privateKey, Duration clientSecretTtl)
extends Record
Settings of one provider. Only the ones that apply to the provider are read: the client secret by Google,
Microsoft and GitHub, the tenant settings by Microsoft and the key settings by Apple (whose client secret is a
JWT signed with the private key).
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theallowedTenantsrecord component.private final StringThe field for theclientIdrecord component.private final StringThe field for theclientSecretrecord component.private final DurationThe field for theclientSecretTtlrecord component.private final StringThe field for thekeyIdrecord component.private final StringThe field for theprivateKeyrecord component.private final StringThe field for theteamIdrecord component.private final StringThe field for thetenantrecord component.private final booleanThe field for thetrustMfarecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedTenantsrecord component.clientId()Returns the value of theclientIdrecord component.Returns the value of theclientSecretrecord component.Returns the value of theclientSecretTtlrecord component.booleanenabled()Tells whether the provider is enabled.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.keyId()Returns the value of thekeyIdrecord component.Returns the tenants an Entra ID sign-in is limited to: the configured list, else the tenant itself when it is a tenant id, else none, which means any tenant (a multi-tenant application, or a tenant given by domain name, whose tokens carry its id).Returns the value of theprivateKeyrecord component.teamId()Returns the value of theteamIdrecord component.tenant()Returns the value of thetenantrecord component.final StringtoString()Returns a string representation of this record class.booleantrustMfa()Returns the value of thetrustMfarecord component.
-
Field Details
-
clientId
The field for theclientIdrecord component. -
clientSecret
The field for theclientSecretrecord component. -
trustMfa
private final boolean trustMfaThe field for thetrustMfarecord component. -
tenant
The field for thetenantrecord component. -
allowedTenants
The field for theallowedTenantsrecord component. -
teamId
The field for theteamIdrecord component. -
keyId
The field for thekeyIdrecord component. -
privateKey
The field for theprivateKeyrecord component. -
clientSecretTtl
The field for theclientSecretTtlrecord component.
-
-
Constructor Details
-
Provider
public Provider(String clientId, String clientSecret, boolean trustMfa, @DefaultValue("common") String tenant, List<String> allowedTenants, String teamId, String keyId, String privateKey, @DefaultValue("PT5M") Duration clientSecretTtl) Copies the tenants and fills the defaults of the unbound settings.
-
-
Method Details
-
permittedTenants
Returns the tenants an Entra ID sign-in is limited to: the configured list, else the tenant itself when it is a tenant id, else none, which means any tenant (a multi-tenant application, or a tenant given by domain name, whose tokens carry its id).- Returns:
- the permitted tenant ids; empty accepts any tenant.
-
enabled
public boolean enabled()Tells whether the provider is enabled.- Returns:
truewhen the client id has text.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
clientSecret
Returns the value of theclientSecretrecord component.- Returns:
- the value of the
clientSecretrecord component
-
trustMfa
public boolean trustMfa()Returns the value of thetrustMfarecord component.- Returns:
- the value of the
trustMfarecord component
-
tenant
Returns the value of thetenantrecord component.- Returns:
- the value of the
tenantrecord component
-
allowedTenants
Returns the value of theallowedTenantsrecord component.- Returns:
- the value of the
allowedTenantsrecord component
-
teamId
Returns the value of theteamIdrecord component.- Returns:
- the value of the
teamIdrecord component
-
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
privateKey
Returns the value of theprivateKeyrecord component.- Returns:
- the value of the
privateKeyrecord component
-
clientSecretTtl
Returns the value of theclientSecretTtlrecord component.- Returns:
- the value of the
clientSecretTtlrecord component
-