Class Requirement
java.lang.Object
se.swedenconnect.bankid.rpapi.types.Requirement
Represents the structure in which a relying party can define how an authentication or signature process should be
performed.
Note: It is recommended to use the Requirement.RequirementBuilder to construct a Requirement.
- Author:
- Martin Lindström
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents a requirement for which type of smart card reader that is required.static classA class implementing a builder pattern for constructingRequirementobjects. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCertificate policy Object Identifier - BankID on file (for production) should be used.static final StringCertificate policy Object Identifier - BankID on file (for test) should be used.static final StringCertificate policy Object Identifier - BankID on smartcard (for production) should be used.static final StringCertificate policy Object Identifier - BankID on smartcard (for test) should be used.static final StringCertificate policy Object Identifier - Mobile BankID (for production) should be used.static final StringCertificate policy Object Identifier - Mobile BankID (for test) should be used.static final StringCertificate policy Object Identifier - Nordea eID on file and smartcard (for production) should be used.static final StringCertificate policy Object Identifier - Nordea eID on file and smartcard (for test) should be used.static final StringCertificate policy Object Identifier - Test BankID for some BankID Banks. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates aRequirementBuilder.builder(Requirement req) Creates aRequirementBuildergiven an already existing requirement.Returns the requirement for which type of smart card reader that is required.Returns the certificate policies telling which types of BankID:s that should be supported.getMrtd()Gets the MRTD flag.Gets the personal eidentification number to be used to complete the transaction.Gets the pin code requirement that tells whether users are required to sign the transaction with their PIN code, even if they have biometrics activated.booleanisEmpty()Predicate that tells whether this object is "empty", meaning that no properties have been assigned.voidsetCardReader(Requirement.CardReaderRequirement cardReader) Assigns the requirement for which type of smart card reader that is required.voidsetCertificatePolicies(List<String> certificatePolicies) Assigns the certificate policies telling which types of BankID:s that should be supported.voidAssigns the MRTD flag.voidsetPersonalNumber(String personalNumber) Assigns the personal eidentification number to be used to complete the transaction.voidsetPinCode(Boolean pinCode) Sets whether users are required to sign the transaction with their PIN code, even if they have biometrics activated.toString()
-
Field Details
-
CP_BANKID_ON_FILE
Certificate policy Object Identifier - BankID on file (for production) should be used.- See Also:
-
CP_BANKID_ON_SMARTCARD
Certificate policy Object Identifier - BankID on smartcard (for production) should be used.- See Also:
-
CP_MOBILE_BANKID
Certificate policy Object Identifier - Mobile BankID (for production) should be used.- See Also:
-
CP_NORDEA_EID
Certificate policy Object Identifier - Nordea eID on file and smartcard (for production) should be used.- See Also:
-
CP_BANKID_ON_FILE_TEST
Certificate policy Object Identifier - BankID on file (for test) should be used.- See Also:
-
CP_BANKID_ON_SMARTCARD_TEST
Certificate policy Object Identifier - BankID on smartcard (for test) should be used.- See Also:
-
CP_MOBILE_BANKID_TEST
Certificate policy Object Identifier - Mobile BankID (for test) should be used.- See Also:
-
CP_NORDEA_EID_TEST
Certificate policy Object Identifier - Nordea eID on file and smartcard (for test) should be used.- See Also:
-
CP_TEST_BANKID
Certificate policy Object Identifier - Test BankID for some BankID Banks.- See Also:
-
-
Constructor Details
-
Requirement
public Requirement()
-
-
Method Details
-
builder
Creates aRequirementBuilder.- Returns:
- a builder
-
builder
Creates aRequirementBuildergiven an already existing requirement.- Parameters:
req- the template requirement- Returns:
- a builder
-
isEmpty
public boolean isEmpty()Predicate that tells whether this object is "empty", meaning that no properties have been assigned.- Returns:
- true if not properties have been assigned, and false otherwise
-
getPinCode
Gets the pin code requirement that tells whether users are required to sign the transaction with their PIN code, even if they have biometrics activated.- Returns:
- whether pin code is required
-
setPinCode
Sets whether users are required to sign the transaction with their PIN code, even if they have biometrics activated.- Parameters:
pinCode- whether pin code is required
-
getMrtd
Gets the MRTD flag. If set to "true", the client needs to provide MRTD (Machine readable travel document) information to complete the order.Only Swedish passports and national ID cards are supported.- Returns:
- the MRTD flag
-
setMrtd
Assigns the MRTD flag. If set to "true", the client needs to provide MRTD (Machine readable travel document) information to complete the order.Only Swedish passports and national ID cards are supported.- Parameters:
mrtd- the MRTD flag
-
getCardReader
Returns the requirement for which type of smart card reader that is required.- Returns:
- the card reader requirement, or
null
-
setCardReader
Assigns the requirement for which type of smart card reader that is required.This condition should be combined with a
certificatePoliciesfor a smart card to avoid undefined behavior.- Parameters:
cardReader- the card reader requirement
-
getCertificatePolicies
Returns the certificate policies telling which types of BankID:s that should be supported.- Returns:
- a list of certificate policy object identifiers
-
setCertificatePolicies
Assigns the certificate policies telling which types of BankID:s that should be supported.It is recommended to use the
Requirement.RequirementBuilderto set up certificate policies.- Parameters:
certificatePolicies- a list of certificate policy object identifiers
-
getPersonalNumber
Gets the personal eidentification number to be used to complete the transaction. If a BankID with another personal number attempts to sign the transaction, it fails.- Returns:
- the personal number or
null
-
setPersonalNumber
Assigns the personal eidentification number to be used to complete the transaction. If a BankID with another personal number attempts to sign the transaction, it fails.- Parameters:
personalNumber- the personal number
-
toString
-