Search in sources :

Example 1 with KeyConversion

use of org.forgerock.openam.cts.utils.KeyConversion in project OpenAM by OpenRock.

the class OAuthAdapterTest method generateOAuthAdapter.

/**
     * @return Makes a standard OAuthAdapter with real dependencies.
     */
private OAuthAdapter generateOAuthAdapter() {
    JSONSerialisation serialisation = new JSONSerialisation(new ObjectMapper());
    KeyConversion keyConversion = new KeyConversion();
    OAuthValues oAuthValues = new OAuthValues();
    TokenBlobUtils blobUtils = new TokenBlobUtils();
    return new OAuthAdapter(new TokenIdFactory(keyConversion), serialisation, oAuthValues, blobUtils);
}
Also used : JSONSerialisation(org.forgerock.openam.cts.utils.JSONSerialisation) KeyConversion(org.forgerock.openam.cts.utils.KeyConversion) TokenIdFactory(org.forgerock.openam.cts.api.tokens.TokenIdFactory) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) TokenBlobUtils(org.forgerock.openam.cts.utils.blob.TokenBlobUtils)

Example 2 with KeyConversion

use of org.forgerock.openam.cts.utils.KeyConversion in project OpenAM by OpenRock.

the class SAMLAdapterTest method setup.

@BeforeMethod
public void setup() {
    serialisation = mock(JSONSerialisation.class);
    tokenIdFactory = mock(TokenIdFactory.class);
    blobUtils = mock(TokenBlobUtils.class);
    encoding = new KeyConversion();
    adapter = new SAMLAdapter(tokenIdFactory, serialisation, blobUtils);
}
Also used : JSONSerialisation(org.forgerock.openam.cts.utils.JSONSerialisation) KeyConversion(org.forgerock.openam.cts.utils.KeyConversion) TokenIdFactory(org.forgerock.openam.cts.api.tokens.TokenIdFactory) TokenBlobUtils(org.forgerock.openam.cts.utils.blob.TokenBlobUtils) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

TokenIdFactory (org.forgerock.openam.cts.api.tokens.TokenIdFactory)2 JSONSerialisation (org.forgerock.openam.cts.utils.JSONSerialisation)2 KeyConversion (org.forgerock.openam.cts.utils.KeyConversion)2 TokenBlobUtils (org.forgerock.openam.cts.utils.blob.TokenBlobUtils)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 BeforeMethod (org.testng.annotations.BeforeMethod)1