Module dev.eidentification.bankid
Record Class Configuration
java.lang.Object
java.lang.Record
dev.eidentification.bankid.configuration.Configuration
- Record Components:
baseURL
- the base url to either the test or production environmentpkcs12
- the pkcs12 context required for authenticationcertificate
- the certificate in form of an input stream
This record encapsulates the configuration required for a BankId client.
Represents essential information for interacting with the BankId system. The primary components of this configuration are the base URL, PKCS12 authentication details, and the requisite certificate. The base URL directs the client to the BankId system. PKCS12 information consists of the necessary authentication credentials. The required certificate ensures secure access to the BankId system.
Provides two static URLs for interacting with the production and test environments of the BankId system: URL_PRODUCTION: URL for the production environment, URL_TEST: URL for the test environment.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConfiguration
(String baseURL, Pkcs12 pkcs12, InputStream certificate) Creates an instance of aConfiguration
record class. -
Method Summary
Modifier and TypeMethodDescriptionbaseURL()
Returns the value of thebaseURL
record component.builder()
Returns the value of thecertificate
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static Configuration
of
(String baseURL, Pkcs12 pkcs12, InputStream certificate) Creates a new Configuration object with the provided base URL, PKCS12 information, and certificate.pkcs12()
Returns the value of thepkcs12
record component.toString()
Returns a string representation of this record class.
-
Field Details
-
URL_PRODUCTION
- See Also:
-
URL_TEST
- See Also:
-
-
Constructor Details
-
Configuration
Creates an instance of aConfiguration
record class.- Parameters:
baseURL
- the value for thebaseURL
record componentpkcs12
- the value for thepkcs12
record componentcertificate
- the value for thecertificate
record component
-
-
Method Details
-
of
Creates a new Configuration object with the provided base URL, PKCS12 information, and certificate.- Parameters:
baseURL
- the base URL used to interact with the BankID systempkcs12
- the PKCS12 information required for authenticationcertificate
- the certificate required for authentication- Returns:
- a new Configuration object
-
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. -
builder
-
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)
. -
baseURL
Returns the value of thebaseURL
record component.- Returns:
- the value of the
baseURL
record component
-
pkcs12
Returns the value of thepkcs12
record component.- Returns:
- the value of the
pkcs12
record component
-
certificate
Returns the value of thecertificate
record component.- Returns:
- the value of the
certificate
record component
-