Module dev.eidentification.bankid
Record Class Requirement
java.lang.Object
java.lang.Record
dev.eidentification.bankid.client.model.Requirement
- Record Components:
pinCode
- Users are required to sign the transaction with their PIN code, even if they have biometrics activated.cardReader
- "class1" (default) – The transaction must be performed using a card reader where the PIN code is entered on a computer keyboard, or a card reader of higher class."class2" – The transaction must be performed using a card reader where the PIN code is entered on the reader, or a reader of higher class.
"no value" – defaults to "class1". This condition should be combined with a certificatePolicies for a smart card to avoid undefined behaviour.
certificatePolicies
- The oid in certificate policies in the user certificate. List of String. One wildcard "" is allowed from position 5 and forward i.e. 1.2.752.78.personalNumber
- The personal number of the user. String 12 digits. Century must be included. If the personal number is excluded, the client must be started with the autoStartToken returned in the response.
public record Requirement(@Nullable Boolean pinCode, @Nullable CardReader cardReader, @Nullable String certificatePolicies, @Nullable String personalNumber)
extends Record
RP may use the requirement parameter to describe how a signature must be created and verified.
A typical use case is to require Mobile BankID or a certain card reader.
A requirement can be set for both auth and sign orders.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder class for creating Requirement objects. -
Constructor Summary
ConstructorsConstructorDescriptionRequirement
(@Nullable Boolean pinCode, @Nullable CardReader cardReader, @Nullable String certificatePolicies, @Nullable String personalNumber) Creates an instance of aRequirement
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns a new instance of RequirementBuilder.@Nullable CardReader
Returns the value of thecardReader
record component.@Nullable String
Returns the value of thecertificatePolicies
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.@Nullable String
Returns the value of thepersonalNumber
record component.@Nullable Boolean
pinCode()
Returns the value of thepinCode
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Requirement
public Requirement(@Nullable Boolean pinCode, @Nullable CardReader cardReader, @Nullable String certificatePolicies, @Nullable String personalNumber) Creates an instance of aRequirement
record class.- Parameters:
pinCode
- the value for thepinCode
record componentcardReader
- the value for thecardReader
record componentcertificatePolicies
- the value for thecertificatePolicies
record componentpersonalNumber
- the value for thepersonalNumber
record component
-
-
Method Details
-
builder
Returns a new instance of RequirementBuilder.- Returns:
- The RequirementBuilder 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. -
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)
. -
pinCode
Returns the value of thepinCode
record component.- Returns:
- the value of the
pinCode
record component
-
cardReader
Returns the value of thecardReader
record component.- Returns:
- the value of the
cardReader
record component
-
certificatePolicies
Returns the value of thecertificatePolicies
record component.- Returns:
- the value of the
certificatePolicies
record component
-
personalNumber
Returns the value of thepersonalNumber
record component.- Returns:
- the value of the
personalNumber
record component
-