protected static OAuth2TokenPersistence getAccessToken() throws Exception { final OAuth2TokenPersistence accessToken = new OAuth2TokenPersistence( MockUtils.getDummyEncrypter()); MockUtils.setTokenCommons(accessToken); accessToken.setType(OAuth2Token.Type.ACCESS); return accessToken; }
protected static OAuth2TokenPersistence getAccessToken() throws Exception { final OAuth2TokenPersistence accessToken = new OAuth2TokenPersistence( MockUtils.getDummyEncrypter()); MockUtils.setTokenCommons(accessToken); accessToken.setType(OAuth2Token.Type.ACCESS); return accessToken; }
protected static OAuth2TokenPersistence getBadMacToken() throws Exception { final OAuth2TokenPersistence accessToken = new OAuth2TokenPersistence( MockUtils.getDummyEncrypter()); MockUtils.setTokenCommons(accessToken); accessToken.setMacAlgorithm(OAuth2Message.HMAC_SHA_256); accessToken.setMacExt("1 2 3"); accessToken.setMacSecret(MockUtils.MAC_SECRET.getBytes("UTF-8")); accessToken.setTokenType(OAuth2Message.MAC_TOKEN_TYPE); accessToken.setType(OAuth2Token.Type.ACCESS); return accessToken; }
protected static OAuth2TokenPersistence getMacToken() throws Exception { final OAuth2TokenPersistence accessToken = new OAuth2TokenPersistence( MockUtils.getDummyEncrypter()); MockUtils.setTokenCommons(accessToken); accessToken.setMacAlgorithm(OAuth2Message.HMAC_SHA_1); accessToken.setMacExt("1 2 3"); accessToken.setMacSecret(MockUtils.MAC_SECRET.getBytes("UTF-8")); accessToken.setTokenType(OAuth2Message.MAC_TOKEN_TYPE); accessToken.setType(OAuth2Token.Type.ACCESS); return accessToken; }
protected static OAuth2TokenPersistence getMacToken() throws Exception { final OAuth2TokenPersistence accessToken = new OAuth2TokenPersistence( MockUtils.getDummyEncrypter()); MockUtils.setTokenCommons(accessToken); accessToken.setMacAlgorithm(OAuth2Message.HMAC_SHA_1); accessToken.setMacExt("1 2 3"); accessToken.setMacSecret(MockUtils.MAC_SECRET.getBytes("UTF-8")); accessToken.setTokenType(OAuth2Message.MAC_TOKEN_TYPE); accessToken.setType(OAuth2Token.Type.ACCESS); return accessToken; }
protected static OAuth2TokenPersistence getBadMacToken() throws Exception { final OAuth2TokenPersistence accessToken = new OAuth2TokenPersistence( MockUtils.getDummyEncrypter()); MockUtils.setTokenCommons(accessToken); accessToken.setMacAlgorithm(OAuth2Message.HMAC_SHA_256); accessToken.setMacExt("1 2 3"); accessToken.setMacSecret(MockUtils.MAC_SECRET.getBytes("UTF-8")); accessToken.setTokenType(OAuth2Message.MAC_TOKEN_TYPE); accessToken.setType(OAuth2Token.Type.ACCESS); return accessToken; }