Class MacAddressUserId
java.lang.Object
org.springframework.vault.authentication.MacAddressUserId
- All Implemented Interfaces:
AppIdUserIdMechanism
Mechanism to generate a UserId based on the Mac address.
MacAddressUserId
creates a hex-encoded representation of the Mac address without any separators
(0123456789AB). A network interface hint can be specified optionally to select a
network interface (index/name).- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
ConstructorDescriptionMacAddressUserId
(int networkInterfaceIndex) Create a newMacAddressUserId
using anetworkInterfaceIndex
.MacAddressUserId
(String networkInterfaceName) Create a newMacAddressUserId
using anetworkInterfaceName
. -
Method Summary
Modifier and TypeMethodDescriptionCreate a UserId for AppId authentication.
-
Constructor Details
-
MacAddressUserId
public MacAddressUserId() -
MacAddressUserId
public MacAddressUserId(int networkInterfaceIndex) Create a newMacAddressUserId
using anetworkInterfaceIndex
. The index is applied toNetworkInterface.getNetworkInterfaces()
to obtain the desired network interface.- Parameters:
networkInterfaceIndex
- must be greater or equal to zero.
-
MacAddressUserId
Create a newMacAddressUserId
using anetworkInterfaceName
. This name is compared withNetworkInterface.getName()
andNetworkInterface.getDisplayName()
to obtain the desired network interface.- Parameters:
networkInterfaceName
- must not be null.
-
-
Method Details
-
createUserId
Description copied from interface:AppIdUserIdMechanism
Create a UserId for AppId authentication.- Specified by:
createUserId
in interfaceAppIdUserIdMechanism
- Returns:
- the UserId.
-