This interface defines the methods that must be implemented by security token providers.
9293949596979899100101102103104105106
{ WSTrustServiceFactory serviceFactory = WSTrustServiceFactory.getInstance(); for (TokenProviderType provider : providers.getTokenProvider()) { // create and initialize the token provider. SecurityTokenProvider tokenProvider = serviceFactory.createTokenProvider(provider.getProviderClass()); Map<String, String> properties = new HashMap<String, String>(); for(PropertyType propertyType : provider.getProperty()) properties.put(propertyType.getName(), propertyType.getValue()); tokenProvider.initialize(properties); // token providers can be keyed by the token type and by token element + namespace. this.tokenProviders.put(provider.getTokenType(), tokenProvider); String tokenElementAndNS = provider.getTokenElement() + "$" + provider.getTokenElementNS(); this.tokenProviders.put(tokenElementAndNS, tokenProvider); }