org.jclouds.oauth.v2.functions
Class OAuthCredentialsSupplier

java.lang.Object
  extended by org.jclouds.oauth.v2.functions.OAuthCredentialsSupplier
All Implemented Interfaces:
com.google.common.base.Supplier<OAuthCredentials>

@Singleton
public class OAuthCredentialsSupplier
extends Object
implements com.google.common.base.Supplier<OAuthCredentials>

Loads OAuthCredentials from a pem private key using the KeyFactory obtained from the JWT Algorithm Name<->KeyFactory name mapping in OAuthConstants. The pem pk algorithm must match the KeyFactory algorithm.

Author:
David Alves
See Also:
OAuthConstants.OAUTH_ALGORITHM_NAMES_TO_KEYFACTORY_ALGORITHM_NAMES

Constructor Summary
OAuthCredentialsSupplier(com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds, org.jclouds.oauth.v2.functions.OAuthCredentialsSupplier.OAuthCredentialsForCredentials loader, String signatureOrMacAlgorithm)
           
 
Method Summary
 OAuthCredentials get()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthCredentialsSupplier

@Inject
public OAuthCredentialsSupplier(com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds,
                                       org.jclouds.oauth.v2.functions.OAuthCredentialsSupplier.OAuthCredentialsForCredentials loader,
                                       @Named(value="jclouds.oauth.signature-or-mac-algorithm")
                                       String signatureOrMacAlgorithm)
Method Detail

get

public OAuthCredentials get()
Specified by:
get in interface com.google.common.base.Supplier<OAuthCredentials>


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.