@ Override public IOpaqueCredentials getOpaqueCredentials ( ) { if ( parentContext != null && parentContext . isAuthenticated ( ) ) { NotSoOpaqueCredentials oc = new CacheOpaqueCredentials ( ) ; oc . setCredentials ( this . cachedcredentials ) ; return oc ; } else return null ; }
We need to override this method in order to return a class that implements the NotSoOpaqueCredentials interface .