org.n52.security.common.crypto
Class AliasMappingKeyProviderDecorator
java.lang.Object
org.n52.security.common.crypto.AbstractKeyPairProviderDecorator
org.n52.security.common.crypto.AliasMappingKeyProviderDecorator
- All Implemented Interfaces:
- KeyPairProvider
public class AliasMappingKeyProviderDecorator
- extends AbstractKeyPairProviderDecorator
Wraps incomming alias names to alias names used in the decorated provider.
If the name can't be mapped the incomming name is given to the decorated provider.
- Author:
- Marko Reiprecht
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AliasMappingKeyProviderDecorator
public AliasMappingKeyProviderDecorator()
AliasMappingKeyProviderDecorator
public AliasMappingKeyProviderDecorator(KeyPairProvider delegate)
getAliasToKeyAliasMap
public Map<String,String> getAliasToKeyAliasMap()
- Returns:
- the aliasToKeyAliasMap
setAliasToKeyAliasMap
public void setAliasToKeyAliasMap(Map<String,String> aliasToKeyAliasMap)
- It is espected that the incoming alias names are used as keys and the internal/outcomming alias names are used as
values.
- Parameters:
aliasToKeyAliasMap
- the aliasToKeyAliasMap to set
resolveByAlias
public KeyPair resolveByAlias(String alias,
char[] password)
throws KeyPairResolvingException
- Description copied from interface:
KeyPairProvider
- Resolves a keypair by an alias.
The provider tries to resolve the private key and its public key or certificate.
Only if none of the elements can be resolved an exception is thrown.
- Specified by:
resolveByAlias
in interface KeyPairProvider
- Overrides:
resolveByAlias
in class AbstractKeyPairProviderDecorator
- Parameters:
alias
- the alias.password
- a password for the private key, can be null.
- Returns:
- KeyPair.
- Throws:
KeyPairResolvingException
- if keypair can't be resolved.- See Also:
KeyPairProvider.resolveByAlias(java.lang.String, char[])
Copyright © 2004–2014 52north.org. All rights reserved.